Cory Posted February 26, 2007 Report Share Posted February 26, 2007 I would love to be able to right click on a file in Windows Explorer and have an option in the menu for "ME processes" that would run a macro. I know I've seen pretty simply programs which add things to this list and I was wondering if anyone knew how. Alternatively I wouldn't mind simply highlighting a file and then run a hotkey macro that would somehow gather the file name so I can do something with it. Quote Link to comment Share on other sites More sharing options...
paul Posted February 27, 2007 Report Share Posted February 27, 2007 I assume you're using Windows XP. In the example below, we're going to add a context menu item called "Me Macro" to ALL files! - Run regedit.exe - Navigate to HKEY_CLASSES_ROOT\* (HKEY_CLASSES_ROOT is the first main branch in your registry) - If the key called "shell" doesn't exist, add it (exclude the double quotes) by right-clicking on *, choosing New / Key. - Right-click on "shell", and choose New / Key - Type "Me Macro", then press ENTER (without the quotes) - Right-click on "Me Macro", and choose New / Key - Type "command", then press ENTER (without the quotes) - Left-click on "command", then, in the right-hand pane, double-click on "Default" - Type in the following, including the quotes: "C:\Program Files\Macro Express3\MeProc.exe" /AContextMacro /VT1%1 Close Regedit. Here's my ContextMacro macro: Variable Restore All Variables Text Box Display: (ContextMenu is now running! Parameter is %T1%) Quote Link to comment Share on other sites More sharing options...
Cory Posted February 27, 2007 Author Report Share Posted February 27, 2007 I followed your instructions to the letter and it looks like it might work but I think there might be somethig about Vista that is causing this not to work. When I right click I see the menu item but I get the error "Windows cannot access the specified device, path, or file. You may not have the appropriete permissions to access the item." Any thoughts? Quote Link to comment Share on other sites More sharing options...
Cory Posted February 27, 2007 Author Report Share Posted February 27, 2007 Here, I exported a key. Maby you could check it out and see if I did it proper. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 27, 2007 Author Report Share Posted February 27, 2007 Oops! When I highlighted I didn't catch the first quote mark. Now it launches but when it displays %T1% it is blank. Seems it isn't passing the file name. Any thoughts? Quote Link to comment Share on other sites More sharing options...
paul Posted February 27, 2007 Report Share Posted February 27, 2007 Ah, a (too?) early take-up of Vista <g>! Vista permissions are rather different to its predecessors, and I have not yet got any practical experience of how to avoid or resolve this type of problem. I think the real problem is that Vista, by default, does not grant you admin permissions - and I imagine that's what you need to change registry settings. Quote Link to comment Share on other sites More sharing options...
paul Posted February 27, 2007 Report Share Posted February 27, 2007 Your zip file contains this value: "C:\\Program Files\\Macro Express3\\MeProc.exe\" /AContextMacro /VT1%1" whereas it should contain this: "C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT1:%T1 (sorry, I omitted the colon before after /VT1) Quote Link to comment Share on other sites More sharing options...
Cory Posted February 27, 2007 Author Report Share Posted February 27, 2007 I'm soooo excited about this and it's tantalizingly close. You're just teasing me, aren't you Paul? <g> "C:\Program Files\Macro Express3\MeProc.exe" /AContextMacro /VT1:%T1 Is what I have in the key now per your instruction. It still returns blank. In the case that Vista was tossing in a greasy monkey wrench I tried it on a Server 2003 machine and got the same result. Are you sure about that syntax? The "%T1" seems an awkward way to end it. I tried "%T1%" and "%1" but still no luck. Any other ideas? Also where can I find a list of command line switches? I see no reference to them in help or o the ME website. I'll keep cracking at it. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 27, 2007 Author Report Share Posted February 27, 2007 I found it!!!!!! Paul you're my golden god for a day. Many thanks. The syntax SB /VT:%1, not /VT:%T1 It works so cool now! My mind is boggling at the possabilities. My problem was when it did not work initially I started changing things. One of the first things I tried was to remove the variable restore and like an idiot never put it back. Once I read the help file on the syntax I saw the need for it and put it back but was getting "T1" as the result. So I went back and tried the %1 trick and it worked perfectly. Still don't understand te restore variables thing but that's a subject for a seperate post. Thank you very much Paul! Quote Link to comment Share on other sites More sharing options...
paul Posted February 27, 2007 Report Share Posted February 27, 2007 My first attempt was this: "C:\Program Files\Macro Express3\MeProc.exe" /AContextMacro /VT1%1 The only thing wrong was the missing colon immediately before the %1. Then we got this: C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT1:%T1 Here we have the mysterious appearance of an unwanted T in %T1. I doesn't seem to matter how many times I checked my script (and I took a great deal of care) - I'm not perfect after all <g>!. Paul you're my golden god for a day. So I can't be God, because God, by definition, is perfect <g>! Quote Link to comment Share on other sites More sharing options...
terrypin Posted February 28, 2007 Report Share Posted February 28, 2007 The syntax SB /VT:%1, not /VT:%T1 It works so cool now! My mind is boggling at the possabilities. Is that now actually correct? Shouldn't the full line be "C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT1:%1 not "C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT:%1 as you are saying? However, I've not got it working with either! Maybe I'll try rebooting... -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
Cory Posted February 28, 2007 Author Report Share Posted February 28, 2007 The fisrt one is correct: "C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT1:%1 This is highly cool. I't killing me becasue I have other things to work on now and I can't play with it yet... Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 1, 2007 Report Share Posted March 1, 2007 Hope you're still around Paul? Any idea why I may be unable to get your interesting technique working please? I'm running XP Home (SP1) The registry key is: HKEY_CLASSES_ROOT\Shell\Me Macro\command Its contents under '(Default)': "C:\Program Files\Macro Express3\MeProc.exe" /AContextMacro /VT1:%1 Location of MeProc on my HD: C:\Program Files\Macro Express3\MeProc.exe But nothing has been added to the r-click context menu of any file in a Windows folder. -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
paul Posted March 1, 2007 Report Share Posted March 1, 2007 The registry key is: HKEY_CLASSES_ROOT\Shell\Me Macro\command Its contents under '(Default)': "C:\Program Files\Macro Express3\MeProc.exe" /AContextMacro /VT1:%1 I didn't make any mention of that registry key! Please take a fresh look at my message of 27th February, especially to the lines between Run regedit.exe and Close Regedit Let us know how you get on. Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 1, 2007 Report Share Posted March 1, 2007 Duh! What a difference an * can make Thanks for replying so promptly - that kept me awake last night! (Yes, sad, I know...) -- Terry, West Sussex, UK Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted March 5, 2007 Report Share Posted March 5, 2007 I have a problem with it not working either. I follwed the posts to the very end. When I right click on a file, it does show up as Me Macro, but nothing happens when I click it. I followed everything to the letter from these posts. Pat Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted March 7, 2007 Report Share Posted March 7, 2007 Hello all! I am still curious how this works. I followed everything that this post describes, but when I click on it, it doesn't do anything. Help! Pat Quote Link to comment Share on other sites More sharing options...
Cory Posted March 7, 2007 Author Report Share Posted March 7, 2007 I'm not sure what to tell you. If you followed the instructions it should work. Did you get an error or anything? Does a macro run when you do it? IOW do you see the 'running man' in the sytem tray? Break it apart. Try associating it with a simple macro that says "Hi there" and see if that runs. Let me see.... If you didn't have the macro loaded in your file it would tell you, so that can't be it. If it was a problem passing the var you would just get a blank like me. Mabye try altering the command in the registry ot try opening notepad or something simple. If it's not doing anything in ME then somethign must be wrong with your MeProc line. Try taking the string from the registry and running it from the Run line. Beyond that I have no idea. It's hard to remmotely troubleshoot a customer complaint like "It doesn't work". What OS are you running? Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted March 7, 2007 Report Share Posted March 7, 2007 Windows XP.... I am not at home yet, but I will look at this when I get home and try some other things. Is the whole post based on Vista? Pat Quote Link to comment Share on other sites More sharing options...
paul Posted March 7, 2007 Report Share Posted March 7, 2007 Is the whole post based on Vista? Not at all. I composed it using XP Professional, but it should work as is under Windows 2000. Earlier than that I cannot guarantee <g>! Have your macro simply display a dialogue box to show that it's running. If it still doesn't work, please do as follows: - tell us what operating system you're using - run regedit.exe - export the contents of the registry key HKEY_CLASSES_ROOT\* to a file - edit that file and copy its contents to the clipboard - paste the clipboard text into your message Quote Link to comment Share on other sites More sharing options...
kevin Posted March 7, 2007 Report Share Posted March 7, 2007 I am using Windows XP Pro and got it to work. Follow the instructions in Paul's post on Feb 26 2007 (the second post in this thread) except use this: "C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT1:%1instead of this:"C:\Program Files\Macro Express3\Meproc.exe" /AContextMacro /VT1%1Note the addition of the : You must also create a macro and the nickname of the macro must match the name you use in the /A parameter ('ContextMacro' in the example). Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted March 7, 2007 Report Share Posted March 7, 2007 Thanks for the help! My OS is Windows XP Home. I tried to run the command on the "RUN" line, but that doesn't work either. Here is the info from the registry: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\Shell] [HKEY_CLASSES_ROOT\*\Shell\Me Macro] [HKEY_CLASSES_ROOT\*\Shell\Me Macro\command] @="\"C:\\Program Files\\Macro Express3\\Meproc.exe\" /AContextMacro /VT1:%1" Let m know what I am doing wrong.... Thanks! Pat Quote Link to comment Share on other sites More sharing options...
paul Posted March 7, 2007 Report Share Posted March 7, 2007 You've got an unwanted \ immediately after Meproc.exe. This means the system thinks Meproc.exe is the name of a folder! Try again, this time without that superfluous \. Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted March 7, 2007 Report Share Posted March 7, 2007 Paul, I copied that straight from the notepad. Why is the system doing that? I am not at home to fix this now, but if you look at it in the registry, it doesn't show that. It show exactly how you have it in your previous post How do you fix that? Pat Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted March 8, 2007 Report Share Posted March 8, 2007 Paul, Is there something wrong with my computer that the unwanted "\" inserts itself into the command line? Anybody know why the registry is doing this? 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.