David Candy's FindHotkeys routines



Larry(LJL269)
07-10-2005, 12:41 AM
Hi David- I was looking 4 a routine to list my many
hotkeys when I found
FindHotkeys.bat & FindHotkeys.vbs in about 25th reply
of post dated Nov 20 2004 @
http://groups-beta.google.com/group/microsoft.public.windowsxp.customize/browse_thread/thread/be85f94525f4b348/f5bf1397b86c671d?q=%22Watch+David+like+a+hawk%22&rnum=3

It runs on my PC but NO output-CMD window just opens &
closes. Perhaps the output goes to a file or I may not
have the debugged version.

Plz advise what I have to do to get these routines to
run. Your help is MUCH appreciated.
Thanks- bye- Larry

Any advise is my attempt to contribute more than I have received but I can only assure you that it works on my PC. GOOD LUCK.

David Candy
07-10-2005, 12:41 AM
Google screwed up the program code so cutting and pasting screws up line
wrapping (though it looks ok in google, it's when one pastes then extra
characters get added). The program didn't output to the command window but
popped up a dialog box with the key listed (Ctrl + C copies a dialog box -
it was designed to find an errant hot key not to list all).

It was probably crashing as it ignores errors, incl google's.

This one is a bit different as it allows output to a dialog box or a cmd
window (depending on the bat file).

It also required the user to edit the program to suit themselves.

============================================
on error resume next
set WshShell = WScript.CreateObject("WScript.Shell")
Dim A
Dim Ag
Set Ag=Wscript.Arguments
If Ag.Count > 0 then
For x = 0 to Ag.Count -1
A = A & Ag(x)
Next
End If
Set FSO = CreateObject("Scripting.FileSystemObject")
f=FSO.GetFile(A)
set lnk = WshShell.CreateShortcut(A)
If lnk.hotkey <> "" then
wscript.echo A & vbcrlf & lnk.hotkey
End If
============================================

Put vbs in c:\

Run either with the path (also c:\ in this example)

c:\Findhotkeys_CMD.bat >>"%userprofile%\desktop\Hotkey List.txt"
or
c:\FindHotkeys.vbs

FindHotkeys_CMD_Redirect incl.bat
is redirect incl (suggest you rename it) so it doesn't include the prompts
in the text file.

As you want a list (and YOU MUST RENAME this file)
FindHotkey (incl the target in a csv).vbs
This differs in it includes the target and there are tabs seperating fields
(great for listings in files, bad for message boxes).

Excel can import csv (technically tab delimited) and in Word open as a text
file (ie just dbl click it) and select all and Table menu - Convert - Text
To Table (exact wording differs with version - you should have 3 columns -
if not check what you have selected).

And I don't use hotkeys at all. I use standard keyboard commands to operate
Windows (Shift + F10, Tab etc) if the mouse is out of reach. Anyway I also
included a list of them (the hta).

"Larry(LJL269)" <NO@EMAIL.COM> wrote in message
news:ede591di05tpf42n9p83n3ukadn543u50s@4ax.com...
> Hi David- I was looking 4 a routine to list my many
> hotkeys when I found
> FindHotkeys.bat & FindHotkeys.vbs in about 25th reply
> of post dated Nov 20 2004 @
>
http://groups-beta.google.com/group/microsoft.public.windowsxp.customize/bro
wse_thread/thread/be85f94525f4b348/f5bf1397b86c671d?q=%22Watch+David+like+a+
hawk%22&rnum=3
>
> It runs on my PC but NO output-CMD window just opens &
> closes. Perhaps the output goes to a file or I may not
> have the debugged version.
>
> Plz advise what I have to do to get these routines to
> run. Your help is MUCH appreciated.
> Thanks- bye- Larry
>
> Any advise is my attempt to contribute more than I have received but I can
only assure you that it works on my PC. GOOD LUCK.

David Candy
07-10-2005, 12:41 AM
"David Candy" <.> wrote in message
news:uvJ092CYFHA.3488@tk2msftngp13.phx.gbl...
> Google screwed up the program code so cutting and pasting screws up line
> wrapping (though it looks ok in google, it's when one pastes then extra
> characters get added). The program didn't output to the command window but
> popped up a dialog box with the key listed (Ctrl + C copies a dialog box -
> it was designed to find an errant hot key not to list all).
>
> It was probably crashing as it ignores errors, incl google's.
>
> This one is a bit different as it allows output to a dialog box or a cmd
> window (depending on the bat file).
>
> It also required the user to edit the program to suit themselves.
>
> ============================================
> on error resume next
> set WshShell = WScript.CreateObject("WScript.Shell")
> Dim A
> Dim Ag
> Set Ag=Wscript.Arguments
> If Ag.Count > 0 then
> For x = 0 to Ag.Count -1
> A = A & Ag(x)
> Next
> End If
> Set FSO = CreateObject("Scripting.FileSystemObject")
> f=FSO.GetFile(A)
> set lnk = WshShell.CreateShortcut(A)
> If lnk.hotkey <> "" then
> wscript.echo A & vbcrlf & lnk.hotkey
> End If
> ============================================
>
> Put vbs in c:\
>
> Run either with the path (also c:\ in this example)
>
> c:\Findhotkeys_CMD.bat >>"%userprofile%\desktop\Hotkey List.txt"
> or
> c:\FindHotkeys.vbs
>
> FindHotkeys_CMD_Redirect incl.bat
> is redirect incl (suggest you rename it) so it doesn't include the prompts
> in the text file.
>
> As you want a list (and YOU MUST RENAME this file)
> FindHotkey (incl the target in a csv).vbs
> This differs in it includes the target and there are tabs seperating
fields
> (great for listings in files, bad for message boxes).
>
> Excel can import csv (technically tab delimited) and in Word open as a
text
> file (ie just dbl click it) and select all and Table menu - Convert - Text
> To Table (exact wording differs with version - you should have 3 columns -
> if not check what you have selected).
>
> And I don't use hotkeys at all. I use standard keyboard commands to
operate
> Windows (Shift + F10, Tab etc) if the mouse is out of reach. Anyway I also
> included a list of them (the hta).
>
> "Larry(LJL269)" <NO@EMAIL.COM> wrote in message
> news:ede591di05tpf42n9p83n3ukadn543u50s@4ax.com...
> > Hi David- I was looking 4 a routine to list my many
> > hotkeys when I found
> > FindHotkeys.bat & FindHotkeys.vbs in about 25th reply
> > of post dated Nov 20 2004 @
> >
>
http://groups-beta.google.com/group/microsoft.public.windowsxp.customize/bro
>
wse_thread/thread/be85f94525f4b348/f5bf1397b86c671d?q=%22Watch+David+like+a+
> hawk%22&rnum=3
> >
> > It runs on my PC but NO output-CMD window just opens &
> > closes. Perhaps the output goes to a file or I may not
> > have the debugged version.
> >
> > Plz advise what I have to do to get these routines to
> > run. Your help is MUCH appreciated.
> > Thanks- bye- Larry
> >
> > Any advise is my attempt to contribute more than I have received but I
can
> only assure you that it works on my PC. GOOD LUCK.
>
>
>

Torgeir Bakken \(MVP\)
07-10-2005, 12:42 AM
David Candy wrote:

> Google screwed up the program code so cutting and pasting screws
> up line wrapping (though it looks ok in google, it's when one
> pastes then extra characters get added).
> (snip)
Hi,

Yes, that is an annoying side effect with the new Google Groups
interface.

What I have found to work better when doing copy/paste from Google
Groups, is to select "show options" and then "Show original", and
doing the copying from there instead.


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

David Candy
07-10-2005, 12:42 AM
I don't normally use google groups. But chkdsk deleted all my files, again.
"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:ejqAYFEYFHA.3212@TK2MSFTNGP10.phx.gbl...
> David Candy wrote:
>
> > Google screwed up the program code so cutting and pasting screws
> > up line wrapping (though it looks ok in google, it's when one
> > pastes then extra characters get added).
> > (snip)
> Hi,
>
> Yes, that is an annoying side effect with the new Google Groups
> interface.
>
> What I have found to work better when doing copy/paste from Google
> Groups, is to select "show options" and then "Show original", and
> doing the copying from there instead.
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx

Larry(LJL269)
07-10-2005, 12:44 AM
Greetings Dave & thank you for your responses & the
files which I have downloaded. I'm recuperating from
thyroid cancer so it may take me awhile to figure how
they fit together- I'm lucky if I spend 1 hr/day on my
PC.

I will work on it eventually since this is something
I've been looking for these past 2+ yrs. I set all of
mine in 1 place & in 1 app but others r set by apps
like my ATI driver. I once published a chart here of
all the 100's of combos possable & how they can be set
(by shortcut or app) like ALT+Num, Win+, CTL+shift,
Clt+Alt, Alt+Shift,... in combo with Numpad, number,
letter, and function keys. Mine r often related so I
look 4 x such that Ctl+Alt+x,Ctr+Shift+x,.. r all
available.

Your help is MUCH appreciated. Thanks- bye- Larry


Any advise is my attempt to contribute more than I have received but I can only assure you that it works on my PC. GOOD LUCK.


David Candy's FindHotkeys routines