 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
wolive
Joined: 20 Jul 2004 Posts: 21 Location: South Africa
|
Posted: Thu Nov 18, 2004 6:43 am Post subject: Input Question |
|
|
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 |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Thu Nov 18, 2004 5:54 pm Post subject: |
|
|
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 |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Thu Nov 18, 2004 9:27 pm Post subject: |
|
|
Nice example.
| Quote: | | Non-character keys are not stored | That is planned, but it might be a while. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|