I'm working on an AutoHotkey app that I want to be triggered by a right click context menu in Windows Explorer. I've been following the pattern from this app:
http://www.donationcoder.com/Software/S ... rtcutThere
which registers/unregisters the context menu. In this app, it appears that the app is run when the context menu triggers it, does its work and then exits, so the app is not persistent.
Is it possible to make an app persistent so that a context menu triggers it AS WELL AS a hotkey, just with different command line arguments?
Is Windows Explorer context menu persistent?
-
- Posts: 32
- Joined: 01 Jun 2017, 09:05
- MilesAhead
- Posts: 232
- Joined: 03 Oct 2013, 09:44
Re: Is Windows Explorer context menu persistent?
You could make a shortcut in the StartUp folder so that the program will start with Windows.
#SingleInstance,force
could be used so that another instance launched by context menu will replace the current one with the command line argument being the file right clicked on.
Have the hotkey ignore the command line argument and do something else, such as react to the active window or whatever.
Also you may want to have a hotkey to remove the program from the context menu. Skrommel's source code that you referenced has the reg and unreg code to add and remove from the context menu.
If you don't want to use a shortcut in StartUp folder you could also add the program to the registry Run key for the current user. In which case it should be run just before the user's logon.
#SingleInstance,force
could be used so that another instance launched by context menu will replace the current one with the command line argument being the file right clicked on.
Have the hotkey ignore the command line argument and do something else, such as react to the active window or whatever.
Also you may want to have a hotkey to remove the program from the context menu. Skrommel's source code that you referenced has the reg and unreg code to add and remove from the context menu.
If you don't want to use a shortcut in StartUp folder you could also add the program to the registry Run key for the current user. In which case it should be run just before the user's logon.
"My plan is to ghostwrite my biography. Then hire another writer to put his
name on it and take the blame."
- MilesAhead
name on it and take the blame."
- MilesAhead
Who is online
Users browsing this forum: marypoppins_1, mikeyww, Rohwedder, RussF and 134 guests