i try to make a hotkey for a shortcut. The shortcut starts a dos_program.
I can make the shortcut but i can not assign a hotkey for it. I use
this for other programs with no problem. But since i upgraded this
dos_program it will not let me use a hotkey. There must be a hotkey
assigned already somewhere.
How can i find assigned hotkeys and delete them?
right click on the short cut and then choose properties.
then in the window that appears you will see the text box to enter the short
cut.
press any key and the ctrl-alt-<your selected key> will appear and that will
be the short cut key.
Regards
M. Rajesh
.Net and Windows Shell MVP
www.winxpsolution.com
Yes i did that with other programs. But this time it does not let me
enter a letter in the ctrl-alt-<your selected key> sequence. It seams
that some letter is assigned already to it in another shortcut (.pif)
but I was not able to find it.
Does anybody know where that information get stored, may be a registry key?
on error resume next
set WshShell = WScript.CreateObject("WScript.Shell")
Set Ag=Wscript.Arguments
set lnk = WshShell.CreateShortcut(A)
If lnk.hotkey <> "" then
msgbox A & vbcrlf & lnk.hotkey
End If
Rename it to findhotkey.vbs
Explorer looks in 4 places for hotkeys, these are read on startup. The hotkey is stored in the shortcut. Only hotkeys on shortcuts in the four locations are live.
Type in a command prompt
cd %UserProfile%\desktop
for %A in (*.lnk) do findhotkey.vbs "%1"
for %A in (*.pif) do findhotkey.vbs "%1"
for %A in (*.url) do findhotkey.vbs "%1"
cd %AllUsersProfile%\desktop
for %A in (*.lnk) do findhotkey.vbs "%1"
for %A in (*.pif) do findhotkey.vbs "%1"
for %A in (*.url) do findhotkey.vbs "%1"
cd %UserProfile%\Start Menu
for /r %A in (*.lnk) do findhotkey.vbs "%1"
for /r %A in (*.pif) do findhotkey.vbs "%1"
for /r %A in (*.url) do findhotkey.vbs "%1"
cd %AllUsersProfile%\Start Menu
for /r %A in (*.lnk) do findhotkey.vbs "%1"
for /r %A in (*.pif) do findhotkey.vbs "%1"
for /r %A in (*.url) do findhotkey.vbs "%1"
Each shortcut, that has a hotkey, will pop up a dialog with the name of the shortcut and it's hotkey.
--
----------------------------------------------------------
'Not happy John! Defending our democracy',
http://www.smh.com.au/articles/2004/06/29/1088392635123.html
"Max Bleuler" <NOma...@olywa.net> wrote in message news:O25o4Zbh...@TK2MSFTNGP10.phx.gbl...
--
Ramesh, Microsoft MVP
Window XP Shell/User
http://www.mvps.org/sramesh2k
"David Candy" <da...@mvps.org> wrote in message
news:evDbIech...@TK2MSFTNGP09.phx.gbl...
thanks for the info, this helps me.
I tried your code but it did not work right away. I changed already the
"for" line to:
for %A in (*.pif) do findhotkey.vbs "%A"
Now it shows all the (*.pif) files in the directory. But there must be
some other typo in findhotkey.vbs . I have to dig up vbs syntax and
will try tonight. At least i know where to look for by hand. On
Windows98 i can assign a hotkey only on one place. On XP it seems i can
assign it many times but XP gets confused with that.
Thank you
Max
David Candy wrote:
> Create a text file and paste lines in
>
> on error resume next
> set WshShell = WScript.CreateObject("WScript.Shell")
> Set Ag=Wscript.Arguments
> set lnk = WshShell.CreateShortcut(A)
> If lnk.hotkey <> "" then
> msgbox A & vbcrlf & lnk.hotkey
> End If
>
> Rename it to findhotkey.vbs
>
> Explorer looks in 4 places for hotkeys, these are read on startup. The hotkey is stored in the shortcut. Only hotkeys on shortcuts in the four locations are live.
>
> Type in a command prompt
>
> cd %UserProfile%\desktop
You may have path problems. To make it work put in c:\ and change
for %A in (*.url) do c:\findhotkey.vbs "%1"
as all these directory changes may make it difficult for the script to be found (but shorten the amount of typing for the start menu FORs).
--
----------------------------------------------------------
'Not happy John! Defending our democracy',
http://www.smh.com.au/articles/2004/06/29/1088392635123.html
"Max Bleuler" <NOma...@olywa.net> wrote in message news:eGznEhhh...@TK2MSFTNGP09.phx.gbl...
I had to change findhotkey.vbs a little to get it running. Here is the
final version of it. Works great to find those hotkeys.
' display shortcut hotkeys in *.lnk, *.pif, *.url
'
on error resume next
set objShell = WScript.CreateObject("WScript.Shell")
set Ag = WScript.Arguments
set lnk = objShell.CreateShortcut(Ag(0))
If lnk.hotkey <> "" Then
WScript.Echo Ag(0) & vbcrlf & vbcrlf & "HotKey=" & lnk.hotkey
End If
I call it with:
for %A in (*.url) do c:\findhotkey.vbs "%A"
Thanks a lot for your help
Max