Jump to content
Macro Express Forums

Global Variables


delarge
 Share

Recommended Posts

hi all.

I'm trying to set up macros for different application which are running at the same time. one of the macros is for creating a folderstructure at a certain location. another macro drives an application for that I'd like to use one of the variables from the foldercreation macro. Is it possible to set up global variables which can be accesed by different macros?

 

thanks for any help.

great application by the way ;)

Link to comment
Share on other sites

Welcome to the group delarge!

 

The answer to your question depends on how you are running the macros. I am assuming at this point that you are not using the Macro Run command to string the macros together, but instead, want to use the variables from the macro that just ran. Remember that only one macro at a time can run. In other words, you cannot fire off a whole bunch of macros at the same time ... well you can, but they will still only run one at a time from the queue.

 

If you want the current macro to start off with variable values from the macro that just finished (the last macro that ran) then place a Variable Restore All command as the first line. Note that you must also have placed a Variable Save All command as the last line in the macro that just ran. This works because for any given session, the variables are preserved in the Macro Express memory space until the next macro is run ... as long as you use the Variable Save All command. And you do not have to save and restore all the variables. Just strings, integers, or decimals, or any combination of them will also work.

 

One problem with this approach is that terminating Macro Express will also erase its memory space (it starts with a clean slate each time it is launched).

Link to comment
Share on other sites

On one machine I use the registry for this, it's fast and therefore I don't have to worry about sleeping hard drives and subsequent timing issues. But it sounds to me like you want something many different machines to have access to. For this I suggest using a text file on a network share. I too have macros that create a folder structure each tmie a new client is added and to keep it straight I keep a file which is a list of that standard structure. This ends up being used for all sorts of things like audits to make sure users aren't changing anything.

Link to comment
Share on other sites

hey.

all your suggestion make sense to me, so I first try the save/restore all variables workflow. I'm not firing all the macros at the same time rather than step by step. I'm trying to automize a workflow for a stoptrick animation movie where different tools are mutually dependent. and because the workflw is shot based I'd like to make sure, that all tools are working on the same folderstructure or rather the same folders.

 

thanks a lot for you're help ;)

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...
 Share

×
×
  • Create New...