How can I see a list of what macros are available using a VB script?

To see an available list of macros in the application create a VB Script macro inside the application with the text below.


It will output a file called MacroList.log to your desktop that will list all of the available commands:


1) Open Tools>Macros>Record a Macro.


2) Note the Script number in the name, for example Script 1.


3) Select VBScript for the Scripting Language. Click OK.



4) Select Tools>Macros>Stop Recording Macro.


5) Go to Tools>Macros>Manage Macros.



6) In the Available Macros box select the script number you created in step 2 above. In the Macro Text box, copy the following text:


USERPRO = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%USERPROFILE%")
FileOut = USERPRO & "\Desktop\MacroList.log"
Set OUTFILE = CreateObject("Scripting.FileSystemObject").OpenTextFile(FileOut, 8, True)

cmdList = geo.meta_list_commands()
OUTFILE.WriteLine("=======================")
for each cmd in cmdList:
OUTFILE.WriteLine(cmd)
next
OUTFILE.close


7) Click on Save.



8) Click on Apply to accept then click Ok.



9) Open Tools>Macros>Play Macro. Select the Script and click on Script 1.



10) There should be a file called MacroList.log on your desktop.



Version 11

To see an available list of macros in the application create a VB Script macro inside the application with the text below.


It will output a file called MacroList.log to your desktop that will list all of the available commands:


1) Open Tools>Macros>Record a Macro.


2) Note the Script number in the name, for example Script 1.


3) Select VBScript for the Scripting Language. Click OK.



4) Select Tools>Macros>Stop Recording Macro.


5) Open Tools>Macros>Manage Macros.


6) In the Available Macros box select the script number you created in step 2 above. In the Macro Text box, copy the following text:


USERPRO = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%USERPROFILE%")
FileOut = USERPRO & "\Desktop\MacroList.log"
Set OUTFILE = CreateObject("Scripting.FileSystemObject").OpenTextFile(FileOut, 8, True)

cmdList = geo.meta_list_commands()
OUTFILE.WriteLine("=======================")
for each cmd in cmdList:
OUTFILE.WriteLine(cmd)
next
OUTFILE.close


7) Click on Accept and then OK.


8) Open Tools>Macros>Run Macro File. Select the Script and click on Execute



9) There should be a file called MacroList.log on your desktop.


Rating:Rating of 4 Stars19 Votes
Was this answer helpful?YesNo
Topic Information
  • Topic #: 5605-816
  • Date Created: 7/29/2009
  • Last Modified Since: 4/13/2012
  • Viewed: 1409
Welcome Guest
Help Desk and Customer Support Software by Parature