Macro Express Forums: Right Click On A File? - Macro Express Forums

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Right Click On A File?

#1 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 26 February 2007 - 02:35 PM

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.
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#2 User is offline   paul 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 710
  • Joined: 04-July 04

Posted 26 February 2007 - 07:53 PM

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%)

Paul
0

#3 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 26 February 2007 - 09:28 PM

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?
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#4 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 26 February 2007 - 09:31 PM

Here, I exported a key. Maby you could check it out and see if I did it proper.
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#5 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 26 February 2007 - 09:35 PM

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?
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#6 User is offline   paul 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 710
  • Joined: 04-July 04

Posted 26 February 2007 - 09:35 PM

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

#7 User is offline   paul 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 710
  • Joined: 04-July 04

Posted 26 February 2007 - 09:43 PM

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)
Paul
0

#8 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 27 February 2007 - 11:16 AM

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.
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#9 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 27 February 2007 - 11:42 AM

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!
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#10 User is offline   paul 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 710
  • Joined: 04-July 04

Posted 27 February 2007 - 05:03 PM

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>!
Paul
0

#11 User is offline   terrypin 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,066
  • Joined: 09-January 07

Posted 28 February 2007 - 11:56 AM

Quote

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
0

#12 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 28 February 2007 - 01:04 PM

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...
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#13 User is offline   terrypin 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,066
  • Joined: 09-January 07

Posted 01 March 2007 - 02:57 AM

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
0

#14 User is offline   paul 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 710
  • Joined: 04-July 04

Posted 01 March 2007 - 03:13 AM

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

#15 User is offline   terrypin 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,066
  • Joined: 09-January 07

Posted 01 March 2007 - 03:28 AM

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
0

#16 User is offline   patgenn123 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 323
  • Joined: 18-April 06

Posted 04 March 2007 - 11:43 PM

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
0

#17 User is offline   patgenn123 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 323
  • Joined: 18-April 06

Posted 06 March 2007 - 08:29 PM

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
0

#18 User is offline   Cory 

  • Master
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,241
  • Joined: 17-February 05
  • Gender:Male
  • Location:Fallbrook, CA
  • Interests:Making money by helping people save money!

Posted 06 March 2007 - 08:50 PM

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?
Cory Jackson
Fallbrook, California
Bluepoint Design
Macro writer for hire! Need help with a macro fast? Just contact me.
0

#19 User is offline   patgenn123 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 323
  • Joined: 18-April 06

Posted 06 March 2007 - 09:09 PM

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
0

#20 User is offline   paul 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 710
  • Joined: 04-July 04

Posted 06 March 2007 - 09:44 PM

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
Paul
0

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic