Jump to content
Macro Express Forums

Right Click On A File?


Recommended Posts

I don't know why you are getting the extraneous \ but I notice that there is more than one extra \.


You say you have:

@="\"C:\\Program Files\\Macro Express3\\Meproc.exe\" /AContextMacro /VT1:%1"

It should be:

"c:\Program Files\Macro Express3\MeProc.exe" /AContextMacro /VT1:%1

What do you see when you edit the key directly using RegEdit? I'm not sure I understand where the @="\" is coming from either.

Link to comment
Share on other sites



What I am doing is clicking on "File", "Export", giving it a file name and saving it to the desktop. On the desktop, I am right-clicking it to click on "edit" and there it is!


In the normal registry screen, it is showing to be correctly worded and sequenced properly, but not on my desktop when it's saved to the desktop. Is there a difference?



Link to comment
Share on other sites

When you export registry information to a file, additional syntax characters are added to allow Windows to properly import the file later. To get this macro working I recommend that you examine your registry using RegEdit and check it to make sure it appears exactly as shown.


Once you verify that the registry entry is correct, then you should make sure that your macro will run from the Run dialog or the Command prompt. If that doesn't work then right-clicking on a file in explorer will not work.


To test this bring up the Run dialog or a Command prompt and type

"C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT1:Hello World

Of course, if you installed the Macro Express program files somewhere else you will need to adjust the path accordingly. And, as previously stated, the nickname of the macro must exactly match /AContextMacro without the /A. In other words, in this example it must be 'ContextMacro'.


The first command in your macro file should be Variable Restore Text Variables. The command line parameter '/VT1:Hello World' puts 'Hello World' into the 'saved variables' memory. Before a macro can see the value in the variable it must retrieve it from the 'saved variables' memory. This is the same place that the Variable Save Text Variables command stores variables.


It works this way for two reasons. First, when Macro Express starts, the individual variables are not necessarily assigned memory space before the command line parameters are parsed. Second, you can control when your macro gets the variables from the command line. You may want a macro that uses variables for other purposes before it gets the values that were assigned via the command line.


Finally, this macro is designed to work by right-clicking on a Desktop icon (representing a file) or a filename within My Computer/Windows Explorer. It will not work when you right-click inside another program. On my system it does not work if I right-click on a folder.

Link to comment
Share on other sites

OK. I Think I got it right this time. When I right click on a file, it saves it and then when I run the ContextMacro in MacroExpress it will put the name of the path and file into %T1%. I see it's working now because I ran it in MacroExpress.


Is that correct?


If that is correct, how can you run the same program to grab more than one filename if you hold the mouse down and highlight multiple files? Is there a way to do that?





Link to comment
Share on other sites

By the way, I want to thank all of you for taking the time out to help me. Since computers are really a side thing for me, I struggle understanding the language of computers mightily. So I really appreciate everyone's time. I don't know how I could repay all of you.


Thanks again!



Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...
  • 1 year later...
Ok, this is cool, and I got it set up first try.


Just one question... and it's probably a noob question at that.


What is the practical use for this? Just an idea (so I can get the gears turning in my head) of how it could benefit me and the work I do with macros.


Thanks! :)


Whatever you want to use it for! Any series of operations on that file. Some may be universal, others may apply only to specific file types. For example:


1) Open a JPG in your preferred image editor, edit it using 1 or more tools (e.g. automatic contrast or gamma adjustment, resize, etc) and re-save it with a new name


2) Change a file's name, adding a complex prefix and/or suffix that you use a lot


3) Add an AVI or MPEG or WMV (or any movie clip file) to the timeline of your movie editing program and make a DVD MPEG2 file from it.


4) Quickly copy or move any file to another folder (either fixed or chosen from a menu).

etc, etc, etc.


Your fresh post in this old thread has reminded me that after implementing Paul's demo 20 months ago I never got around to adapting it myself for the 101 applications it inspired. So yet another project goes onto the ever-growing To Do list! ;)




EDITED FOOTNOTE: I've just stumbled across one potential snag to watch out for. Several of my frequently-used macros already r-click a file and then arrow down to select a particular menu entry. (When the alternative use of a specific letter is unrelaible or problematic.) The addition of a new item, like Me Macro can, of course, change the position of the target entry, requiring the macro to be modified with an extra Arrow Down command.




Terry, East Grinstead, UK

Link to comment
Share on other sites

Ahhh, thanks Terry,


Right now, if I have a bunch of photos pulled up in their original state in my photo editor, I have a macro that I run that resizes

them to fit more sensibly in emails or for uploading to my blog, then it changes the name (adding a "smaller - " to distinguish it

from the original), and saves it in a different folder (keeping my "smallers" separate from the originals), closes that picture and

then moves on to the next photo.


So, if I am understanding correctly, I could use this macro and change the guts of ContextMacro to essentially do what I was

doing with the previous macro, but just one pic at a time. Or, obviously, I could expand the macro to do a variety of tasks. It's

essentially a really useful way to capture a path and add it to %T1%


Ok, the gears are turning now. Very helpful suggestions, thanks again!

Link to comment
Share on other sites

Yes, that's it.


I suspect that I'll only recognise its full potential after trying some practical examples. I have many 'normal' macros at present that start from the mouse cursor hovering over a file in a Windows folder. My first thoughts for using these 'context macros' are along the lines of replacing the existing macros, perhaps with gains in simplicity/reliability. But my present r-click context menu is already very long so that approach could quickly become unmanagable.


So another idea is to develop a comprehensive menu approach based on this new method. I'd r-click a file and would get a top level menu, maybe by file type

- Text (TXT,INI,LOG, etc)

- Image (JPG, PNG, etc)

- Movie (AVI, MPG, etc)

- Mapping (KML, GPX, MMO, etc)

- Office (DOC, XLS, etc)


Then, if I left-clicked one of these, the next (perhaps final) level of sub-menu would be offered, e.g, from Image

- Resize to 1024 x 576

- Resize to largest possible 4:3

- Resize to largest possible 16:9

- Add to IrfanView for batch processing

- Open in PSP and apply effect xxx



I've done very little with MX menus so far, so that might take a major effort. Maybe one day...



Terry, East Grinstead, UK

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.

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.

  • Create New...