Jump to content
Macro Express Forums

Direct editing of Macro files


Recommended Posts

For some dumb reason I thought one could actually edit a MEX file directly with a hext/text editor. Can someone confirm that this can not be done?

 

I have a zillion registry commands that point to the miscellaneous key in the registry under Macro Express and I'm converting to MEP and will doing a mass roll out. Guess what, the registry key changed and i have to change them all. D'oh!

Link to comment
Share on other sites

For some dumb reason I thought one could actually edit a MEX file directly with a hext/text editor. Can someone confirm that this can not be done?

 

I have a zillion registry commands that point to the miscellaneous key in the registry under Macro Express and I'm converting to MEP and will doing a mass roll out. Guess what, the registry key changed and i have to change them all. D'oh!

 

Can't remember the details but I tried it once and it failed. I'm no programmer, but I recall from subsequent research that it was probably because the size of my 'Replace' was different to my 'Find'. Hang on, I'll test it ...

 

Yep, I just tried changing a single character and that worked OK. ME Pro opened OK and all 3 occurrences had been changed. (I changed the name of a macro, from '4 Volume Curve markers' to '4 Volume Kurve markers'.)

 

So if you're lucky and the new key happens to be the same length it should work without fuss. But I expect that unlike me you know your way around hex editing, so you can probably do it with any size of text replacement, by altering other obscure stuff like 'checksums' etc.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

For some dumb reason I thought one could actually edit a MEX file directly with a hext/text editor. Can someone confirm that this can not be done?

The .mex file format is a binary format. If you edit it you will more than likely damage it. As Terry points out, however, you might be able to get away with simple changes such as changing a drive letter from C: to D:.

 

I have a zillion registry commands that point to the miscellaneous key in the registry under Macro Express and I'm converting to MEP and will doing a mass roll out. Guess what, the registry key changed and i have to change them all. D'oh!

Do you use variables as constants? I like to set variables at the top of my macros that contain constants such as file paths and registry keys. This makes them easier to modify later.

 

Another way to edit macros would be to export a macro to a .mxe (playable macro) file, edit the file, and import it. The .mex format is a text (not binary) format. I recognize that this is tedious.

Link to comment
Share on other sites

Thanks for all the suggestions but none are less laborious really. As per our earlier posts I was able to export the entire macro text and generate a hit list. Then I just open each affected macro do a find and replace. I was going to do a macro for this but it's really not that big of a deal. I sure would like a global find and replace someday...

 

In some of the macros I set the current registry path to a variable which helps in some cases but besides the miscellaneous key you also changed the names of the keys with the email settings and such. So I have to surgically alter these on a case by case. In more recent macros I create macro folder packages with INI files. So in the beginning of each macro I do a little setup routine using the macro file path and a setup.ini file would contain things like this. But really it wasn't so ill conceived since running the macro presupposes that the ME key and Miscellaneous keys are there to be used. I just hadn't anticipated you would create a whole new key for version 4 and change the subkey names as well.

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