OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 13-09-2011, 02:13
beczukdavid
Guest
 
Posts: n/a
Default Create an automated Install for a Macro

Hi guys, I need some help.

I created a macro for our company and the situation is as follows:
We have a branch of the company in India, I don't want to offend anyone but they don't know anything about macros and install of a macro, never the less how to create a shortcut for that macro and I am in a different part of the world.

Is there a way I could create an installer that puts the GMS to the correct folder and create an Icon in Corel Draw, with assigned shortcut and all?

The version of CD is X3 and X4

Please Help
Thank You guys.

Last edited by beczukdavid; 13-09-2011 at 19:48. Reason: Spelling errors
Reply With Quote
  #2  
Old 11-10-2011, 05:55
brujitacastiza
Guest
 
Posts: n/a
Talking Yoa can create a Workspace

Hello:

I´m new in this forum, but I trie to help you with your problem. I´m not english, so, if I fail with the traslation, sorry... I´ll trie to speak well... you can correct me ...


You can create a commandbar in Corel in your computer, and you can export it... it´s a file you can send by email, they only have to import it in Corel. You can make a document to explain it step by step.

I made a code to import theWorkspace when Corel opens. The only problem is that it run each time someone open Corel, and you need to have the gms installed. I use it for new version of the code. Tell me if you want it.

To copy the gms you can make it with Visual Basic the first time, o with a batch in MS-DOS.

bye
Reply With Quote
  #3  
Old 12-10-2011, 04:51
shark shark is offline
Senior Member
 
Join Date: Aug 2010
Location: Russia, Belgorod
Posts: 145
Default

Google for "MacroInstaller" by "woxxom"
Reply With Quote
  #4  
Old 17-10-2011, 03:56
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default NSIS Installer

Alright here is my code for a NSIS installer. You will need to download NSIS here:

Nullsoft Scriptable Install System

You will need to rename the attached .txt file to .nsi.

Code:
; This script creates a GMS installer for CorelDRAW
; To compile this script please visit - NSIS - http://nsis.sourceforge.net/Download
; This script is based on a version by the great Os - wOxxOm - http://woxxom.vbabyexample.com/

!define MyName "MyMacroName" ; The name of the installer and macro (.gms) to be installed
!define Icon "MyMacroIcon" ; The name of the installer icon

SetCompressor /SOLID lzma ; Define the compression we will use for .exe
Name "${MyName}" ; The name of the installer
OutFile "${MyName}.exe" ; The name of the file to write
XPStyle on ; Make the UI Pretty
InstallColors /windows ; Make the UI Pretty
ShowInstDetails show ; Shows the details of the installer, can be set to 'hide' or 'nevershow'
SetDateSave on ; Saves the last write date and time of the file
CRCCheck on ; Perfrom CRC Check before install

; If icon was defined us it, else use the default icon
!ifdef Icon
	Icon "${Icon}.ico"
!else
	Icon Icon.ico
!endif

; Load languages the installer will be available in
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Russian.nlf"

RequestExecutionLevel admin ; Request application privilege for Windows Vista / Windows 7

Page components ;components selection page
Page instfiles ;installation page where the sections are executed

; Define versions available for installer
var cdr11
var cdr12
var cdr13
var cdr14
var cdr15

!include Sections.nsh
!include LogicLib.nsh
!include WinMessages.nsh

;Check if CorelDRAW is running
!macro CheckRunningCorelDRAW appVer appVerFriendly
	${DO}
		FindWindow $0 "CorelDRAW ${appVer}.0"
		; Adding a check for X5 versions
		${IF} $0 = 0
			FindWindow $0 "CorelDRAW ${appVer}.1"
		${ENDIF}
		${IF} $0 = 0
			FindWindow $0 "CorelDRAW ${appVer}.2"
		${ENDIF}
		${IF} $0 = 0
			${BREAK}
		${ENDIF}
		ShowWindow $0 ${SW_SHOW}
		BringtoFront
		MessageBox MB_OKCANCEL  "Close CorelDRAW ${appVerFriendly} and press OK" IDOK +2
		abort "Installation aborted"
	${LOOP}
!macroend

;install the .gms file
!macro execSection appVer appVerFriendly
	detailprint "————————————————— CorelDRAW ${appVerFriendly} ———————————"
	!insertmacro CheckRunningCorelDRAW ${appVer} ${appVerFriendly}
	strcpy $0 "$cdr${appVer}\draw\gms\${MyName}.gms"
	${IF} ${FileExists} $0
		MessageBox MB_YESNOCANCEL "Overwrite?$\n$\n($0)" IDYES +2 IDNO +4
		abort "Installation aborted"
	${ENDIF}
	SetOutPath "$cdr${appVer}\draw\gms\"
	File ${MyName}.gms
!macroend

; availble versions
SectionGroup /e "!${MyName}"
	Section /o "" sec11
		${IF} $cdr11 != "CorelDRAW 11"
			!insertmacro execSection 11 11
		${ENDIF}
	SectionEnd
	
	Section /o "" sec12
		${IF} $cdr15 != "CorelDRAW 12"
			!insertmacro execSection 12 12
		${ENDIF}
	SectionEnd
	
	Section /o "" sec13
		${IF} $cdr13 != "CorelDRAW X3"
			!insertmacro execSection 13 X3
		${ENDIF}
	SectionEnd
	
	Section /o "" sec14
		${IF} $cdr14 != "CorelDRAW X4"
			!insertmacro execSection 14 X4
		${ENDIF}
	SectionEnd
	
	Section /o "" sec15
		${IF} $cdr15 != "CorelDRAW X5"
			!insertmacro execSection 15 X5
		${ENDIF}
	SectionEnd
SectionGroupEnd

; check which versions for CorelDRAW are installed
!macro regCheckCorel appVer
	ReadRegStr $0 HKLM "SOFTWARE\Corel\CorelDRAW\${appVer}.0" "ConfigDir"
	strcpy $0 $0 -6
	strcpy $1 "$0Programs\coreldrw.exe"
	strCpy $0 $0 -1	
	strcpy $cdr${appVer} "$0"
	${IF} ${FileExists} $1
		!insertmacro SelectSection "${sec${appVer}}"
	${ENDIF}
!macroend

Function .onInit
	!insertmacro regCheckCorel "11"
	!insertmacro regCheckCorel "12"
	!insertmacro regCheckCorel "13"
	!insertmacro regCheckCorel "14"
	!insertmacro regCheckCorel "15"
	
	${IF} ${SectionIsSelected} ${sec11}
		SectionSetText ${sec11} "CorelDRAW 11"
	${ENDIF}
	${IF} ${SectionIsSelected} ${sec12}
		SectionSetText ${sec12} "CorelDRAW 12"
	${ENDIF}
	${IF} ${SectionIsSelected} ${sec13}
		SectionSetText ${sec13} "CorelDRAW X3"
	${ENDIF}	
	${IF} ${SectionIsSelected} ${sec14}
		SectionSetText ${sec14} "CorelDRAW X4"
	${ENDIF}
	${IF} ${SectionIsSelected} ${sec15}
		SectionSetText ${sec15} "CorelDRAW X5"
	${ENDIF}
FunctionEnd
Hope it helps,

-Shelby
Attached Files
File Type: txt MakeGMSInstall.txt (4.1 KB, 509 views)
Reply With Quote
  #5  
Old 04-04-2012, 12:54
beczukdavid
Guest
 
Posts: n/a
Default

Thank you very much for the script. I just created my own installer. It works like a charm. I also added a splash screen to it

I wish it would have the knowledge to automate also the button add on the workspace.
Reply With Quote
  #6  
Old 05-04-2012, 08:19
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Toolbar

I will add the idea to my wish list for a future blog post. :-)

-Shelby
Reply With Quote
  #7  
Old 30-10-2012, 07:16
juran juran is offline
Member
 
Join Date: Oct 2012
Posts: 35
Default gms creator for X4

Can your "GMS Creator.exe" work in X 4 ??
Reply With Quote
  #8  
Old 31-10-2012, 15:15
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Installer

Yes, this supports X4.

-Shelby
Reply With Quote
  #9  
Old 01-11-2012, 01:53
juran juran is offline
Member
 
Join Date: Oct 2012
Posts: 35
Default gms creator

But... the Application tab box shows only CorelDraw X3 and Corel PhotoPaint X3.
How to get X4 in that ??
Reply With Quote
  #10  
Old 01-11-2012, 15:12
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,769
Blog Entries: 9
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default X4

Is X4 installed on the system? It will only show if it was found. Also you may want to look at this blog entry as it has some updated code:

Docker or Macro Installer

-Shelby
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automated Export with associated files Jeff CorelDRAW/Corel DESIGNER VBA 4 30-05-2011 12:26
How install macro using setup wizard on other Computer aakkaarr CorelDRAW/Corel DESIGNER VBA 1 19-09-2009 02:41
Macro for create boundary option nikhiscd Macros/Add-ons 14 01-11-2006 00:38
Create a Macro for a tool's settings? riccarcf Macros/Add-ons 7 20-11-2005 09:35
Batch/Automated Printing claudius CorelDRAW/Corel DESIGNER VBA 4 20-01-2003 17:56


All times are GMT -5. The time now is 14:05.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com