Jump to content
Macro Express Forums

Some macro conversion macros


Recommended Posts

Due to some bugs in MEP I found that I needed to convert a lot of my ME3 macros and convert them to be more like I would design an MEP macro. It's been a hugely time consuming process. But in that process I created a couple of macros and I was wondering if there was any interest in them.

 

The first if a variable lister/converter. It's actually two macros. The first macro hunts down all the instances of CDNT variables and lists them. It dumps this into a specially formatted text file along with the original script. Then I open this file and next to all the variables I type what I want the new variable name to be, EG %T[34]% become %Last Name%. Once I'm satisfied I run the second macro and it makes all the substitutions and sticks the new script on your clipboard. Now you can just delete your old script and paste in the new. Then I manually delete all the CDNT array declarations and hit save and respond to all the prompts to define vars. Some work on arrays like in a ASCII File Process need to be manually dealt with but that's usually minimal. Of course one needs to compare th new var declarations to the old list but usually it works really slick and only rarely needs some tweaking.

 

The next macro lists all the occurrences of any text, command or whatever in a file. One simply exports the macro information, script and name only, and runs the macro against it. It prompts you for some search text and the macro creates a report file that lists only the macros where it occurs and each line number it occurs on. Makes it real easy to get in there and fix some things like the Multiple Choice prompt conversion bug.

 

Anyway if anyone is interested I'll post the on my website but I'm guessing most everyone has their own solutions.

Link to comment
Share on other sites

Due to some bugs in MEP I found that I needed to convert a lot of my ME3 macros and convert them to be more like I would design an MEP macro. It's been a hugely time consuming process. But in that process I created a couple of macros and I was wondering if there was any interest in them.

 

The first if a variable lister/converter. It's actually two macros. The first macro hunts down all the instances of CDNT variables and lists them. It dumps this into a specially formatted text file along with the original script. Then I open this file and next to all the variables I type what I want the new variable name to be, EG %T[34]% become %Last Name%. Once I'm satisfied I run the second macro and it makes all the substitutions and sticks the new script on your clipboard. Now you can just delete your old script and paste in the new. Then I manually delete all the CDNT array declarations and hit save and respond to all the prompts to define vars. Some work on arrays like in a ASCII File Process need to be manually dealt with but that's usually minimal. Of course one needs to compare th new var declarations to the old list but usually it works really slick and only rarely needs some tweaking.

 

The next macro lists all the occurrences of any text, command or whatever in a file. One simply exports the macro information, script and name only, and runs the macro against it. It prompts you for some search text and the macro creates a report file that lists only the macros where it occurs and each line number it occurs on. Makes it real easy to get in there and fix some things like the Multiple Choice prompt conversion bug.

 

Anyway if anyone is interested I'll post the on my website but I'm guessing most everyone has their own solutions.

 

 

Could it be used for the more general purpose discussed in http://pgmacros.invisionzone.com/index.php?showtopic=3568 ?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Yeah. I had manually done this a long time ago and had written a less elegant macro as I mentioned in that post. This one has a nicer report that lists the macro name then line numbers of the occurrences. The lister results look like:

 

My favorite macro: 34, 78, 194

Get date string from file name: 45

World peace: 21, 89, 342

 

And so on.

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