Jump to content
Macro Express Forums

File Manipulation Overwriting Other Macro Files


cyberchief
 Share

Recommended Posts

Currently, I have 6 macro files... all exactly the same... I use the File manipuation command to overwrite 5 of them using my main file (the one I make all changes in). This works fine. I also have some individual commands that when executed, will only overwrite 1 of the other files with my main file. Basically, I have 5 terminals set up with each running one of the macro files... terminal 1 is running macro1.mex, terminal 2 is running macro2.mex, etc. When I run a project, I either have to make the changes and input the variable information in each mex file (mulitple terminals running the same project)... or I have to make it in my main mex file, and run the overwrite... then erase the changes I made in the main mex file. What I would like to do... is be able to make the changes in any one of the mex files... and overwrite any of the others... sounds confusing... but I want to set a variable to equal the current mex file I am in... and in the file manipulation, set the file path "from" to %T1% (current mex file).

 

Currently, this is what I have to overwrite just 1 other mex file:

<DOFILE:05:NN:Z:\H_Drive\Gba\QMacro\Main Macro File\Main.mex>Z:\H_Drive\Gba\QMacro\Main Macro File\Macro 1.mex>

 

This is what I would like to do with %T1% equaling the current mex file I am in whether it be 2, 3, 4, or 5 (not 1, since that is what the below example is changing):

 

<DOFILE:05:NN:%T1%>Z:\H_Drive\Gba\QMacro\Main Macro File\Macro 1.mex>

 

Is there a way to set %T1% to equal the mex file I am currently using? and will the variable work in the file manipulation?

Link to comment
Share on other sites

Hello Cyberchief!

 

Get the currently running library file name from the Registry:

 

Set Variable %T1% to "Preferences Registry Key"
Read Registry String: "Current File"

<VSETMISC:T1:Preferences Registry Key><REGRSTR:2:%T1%\Miscellaneous\Current File>

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