AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Input Question

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
wolive



Joined: 20 Jul 2004
Posts: 21
Location: South Africa

PostPosted: Thu Nov 18, 2004 6:43 am    Post subject: Input Question Reply with quote

When using Input, Non-character keys are not stored. Is it not possible to include the function keys for use as required below.

Thanks

CTRL::
Input, lh_str, L1 T1

If lh_str = e
Run, Excel.exe
Else
If lh_str = n
Run, Notepad.exe
; Else
; If lh_str = F1
; Run, Some Application

Return
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Thu Nov 18, 2004 5:54 pm    Post subject: Reply with quote

GetKeyState is more flexible for single keys. You could re-write that as this:

Code:
Ctrl::
loop 200
{
GetKeyState, _e, e
GetKeyState, _n, n
GetKeyState _f1, F1

If _e = D
{
Run, Excel.exe
return
}

Else if _n = D
{
Run, notepad.exe
return
}

Else if _f1 = D
{
Run, some application
return
}

Else
Sleep, 5
}
return
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Thu Nov 18, 2004 9:27 pm    Post subject: Reply with quote

Nice example.

Quote:
Non-character keys are not stored
That is planned, but it might be a while.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group