Jump to content
Macro Express Forums

Passing Variables From Command Line, How?


jorg

Recommended Posts

Hi everybody,

 

I am not able to pass any variables to my macro by command line. The help tells me I should use /VT1:something like;

 

d:\Usr\Jorgen\build.mxe /VT1:CcBase.dpr

 

Then in my macro the first I do is "Variable Restore Text Variables" and I print the content of the variable in a message box like;

 

T1: %T1%

T2: %T2%

T4: %T4%

 

The vars are always empty! I thought it was the macro that could not be ran like this, so I tried with running it with Macro Express executable as well:

 

e:\progra~1\macroe~1\MacExp.exe /MXE:d:\Usr\Jorgen\build.mxe /VT1:Test

 

That did not even run the macro at all. Can somebody explain to my why I cannot run a macro with passed variables? The help clearly states that it can be done.

 

Regards,

Link to comment
Share on other sites

You can launch a macro in your macro file and pass variables to it. Macro Express does not recognize an attempt to pass variables to a playable (.mxe) macro. This works:

 

Create this macro:

Variable Restore All Variables
Text Box Display: Show Variables

Name the macro "Sample: Command line variables" (without the "s)

 

Create a shortcut on your desktop:

  • Right-click on the desktop
  • Click New, Shortcut
  • Type this in the Location field:

"C:\Program Files\Macro Express3\MeProc.exe" /ASample: Command line variables /VT2:Now is the time /VN1:156 /VD5:22.25 /VT1:This is T1

  • Click the Next button
  • Type a name for the shortcut
  • Click the Finish button

Click on the shortcut to run the macro

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...