 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
larl47303 Guest
|
Posted: Fri Mar 11, 2005 9:24 pm Post subject: Press any key to Continue |
|
|
I am sure that this is possible although I am having difficulty figuring it out
I would like to be able to use this in a script
Thanks in Advance
LarryB |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sat Mar 12, 2005 2:25 am Post subject: |
|
|
Assuming a simple "MsgBox Press OK to continue" isn't enough:
Although it doesn't work on Windows 9x, the Input command is the purest way to do this:
| Code: | #space:: ; Win+Space hotkey.
Input, SingleKey, L1, {LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}
MsgBox You pressed a key.
return |
The above lists most non-character keys (such as the modifier keys and arrow keys) as "end keys" because such keys are not captured otherwise. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4016 Location: Pittsburgh
|
Posted: Sat Mar 12, 2005 3:16 am Post subject: |
|
|
We can add a few more endkeys, and let them be shown in the MsgBox. {ScrollLock} is the only standard key, which does not seem to show up. (Maybe my KVM switch catches it?) This script is a fast way to find the keynames. | Code: | #Space::
Input, Key, L1, {ScrollLock}{CapsLock}{NumLock}{TAB}{Esc}{BS}{Enter}{PrintScreen}{Pause}{LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}
IfEqual Key,, StringTrimLeft, Key, ErrorLevel, 7
MsgBox You pressed the »%Key%« key
return |
|
|
| 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
|