delarge Posted July 30, 2005 Report Share Posted July 30, 2005 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 Quote Link to comment Share on other sites More sharing options...
bobchernow Posted July 30, 2005 Report Share Posted July 30, 2005 The real question is can you not do that :-). In ME ALL variables are global and the only thing you can do to sorta have loval ones is to save and restore them at the beginning and end of a macro Quote Link to comment Share on other sites More sharing options...
randallc Posted July 30, 2005 Report Share Posted July 30, 2005 Hi, I think your options are to; 1. Save/ read variables from an "ini" file - probably best. 2. Save/ read variables from a "txt" file 3. Save/ read variables from the registry. There are examples of usage, but I'd have to look if you need them..... Best, Randall. Quote Link to comment Share on other sites More sharing options...
joe Posted July 30, 2005 Report Share Posted July 30, 2005 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). Quote Link to comment Share on other sites More sharing options...
Cory Posted August 1, 2005 Report Share Posted August 1, 2005 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. Quote Link to comment Share on other sites More sharing options...
delarge Posted August 2, 2005 Author Report Share Posted August 2, 2005 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.