Kevin,
As previously mentioned, if hkNextLine is not defined in the active set,
your routine will not do what you think. You'll need to iterate through
the hotkeys in the active set to see if the key is defined. Something like:
foundKey = False
For Each hk In ActiveSettings.Hotkeys
If hk.Id = hkNextLine And hk.Key <> "Undefined" Then
foundKey = True
Exit For
End If
Next
If foundKey Then
' Success
Else
' Fail
End If
Aaron
On 5/25/2009 7:07 PM, Stephen Clower wrote:
Kevin,
Are the troublesome hotkeys defined in your active set? If not, then the
logic for the hotkey in question will never fire.
Best regards,
Steve
On 5/25/2009 6:59 PM, Kevin Simon Huber wrote:
Hi Chip:
If you go into the Scripting Manual, and look at the Onhotkey event of
the Application object.
Then go to the Hotkeyid link and you will find aHKNextLine.
The other thing you can do is put a statment like:
speak "hello" in the function, right before the If statement. That
should cause Window-eyes to say "hello" when you press any hotkey, and
then do what you expect that hotkey to do.
This will happen with some hotkeys and not with others.
Kevin Huber
----- Original Message ----- From: "Chip Orange" <[email protected]>
To: <[email protected]>
Sent: Monday, May 25, 2009 3:47 PM
Subject: RE: Onhotkey event doing funny things
Hi Kevin,
In my set files, the next line hot key is not defined. I'm not sure when
you are expecting this to happen, but since it's undefined, it looks
to me
like it will never happen.
are you trying to get this to happen when the user presses the up or
down
arrow key?
Chip
-----Original Message-----
From: Kevin Huber [mailto:[email protected]]
Sent: Monday, May 25, 2009 3:01 PM
To: gw-scripting
Subject: Onhotkey event doing funny things
Hi
I have written the following code using the Onhotkey event:
ConnectEvent Application, "OnHotkey", "Onhotkey"
Function Onhotkey(hotkeyId, isBeforeAction, defaultActionAborted)
If hotkeyId = HKNextLine And not isBeforeAction Then sleep 500
ExecuteHotkey(hkStatusLine)
End If
OnHotkey = false
End Function
However, if I replace the hotkeyID in the If statement by HKTitleApp,
then
it works fine.
Why does the OnHotkey event seem to work for some hotkeys and not for
others?
Kevin Huber
__________ Information from ESET Smart Security, version of virus
signature database 4103 (20090525) __________
The message was checked by ESET Smart Security.
http://www.eset.com
--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development