Hi Chip, Aaron and Steven:
Thanks for the responses. Now I get it. I guess that if I want to use those hotkeys in a script, I will need to define them first. Thanks for your help, Guys.
Kevin Huber


----- Original Message ----- From: "Chip Orange" <[email protected]>
To: <[email protected]>
Sent: Monday, May 25, 2009 9:54 PM
Subject: RE: Onhotkey event doing funny things


Hi Kevin,

the hkNextLine you mention is a constant, for a possible hotkey function
that window eyes is capable of performing.

As you've probably gathered from the responses to your question though, just
because there's a constant for you to test with doesn't mean that this
function has a key defined for it. without a defined hotkey, your test will never yield true. even if there were a hotkey defined for it, if you didn't know what it was, then your test would never yield true (I mean, suppose you
thought it was down arrow, and you kept pressing that, but nothing would
happen if it were really alt-period defined for the hkNextLine function).

hth,

Chip


-----Original Message-----
From: Kevin Simon Huber [mailto:[email protected]]
Sent: Monday, May 25, 2009 6:59 PM
To: [email protected]
Subject: Re: Onhotkey event doing funny things

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





__________ Information from ESET Smart Security, version of virus signature database 4103 (20090525) __________

The message was checked by ESET Smart Security.

http://www.eset.com




Reply via email to