| View previous topic :: View next topic |
| Author |
Message |
jg0001
Joined: 19 Aug 2009 Posts: 4
|
Posted: Mon Nov 16, 2009 8:56 pm Post subject: How do I make a script wait for a keypress to continue? |
|
|
In the code below (sends a few different items to a Bloomberg screen), I'd like to replace the Sleep commands with something that will wait for the spacebar to be pressed before continuing. I know a Msgbox with just an "okay" works, but then that dialog box blocks the screen I'm looking at. I also tried using a separate hotkey for pausing, but that seemed inelegant.
| Code: | ^!z::
SetKeyDelay, 10
Send SPX {F10} IGPO5 {Enter}
Sleep,2500
Send IWM {F8} IGPO5 {Enter}
Sleep,2500
Send RJA {F8} IGPO5 {Enter}
Sleep,2500
Send MSFT {F8} IGPO5 {Enter}
Sleep,2500
Send USO {F8} IGPO5 {Enter}
Return
|
|
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 1770 Location: MN, USA
|
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 1158 Location: San Diego, California
|
|
| Back to top |
|
 |
jg0001
Joined: 19 Aug 2009 Posts: 4
|
Posted: Mon Nov 16, 2009 9:23 pm Post subject: |
|
|
| Excellent... I don't know how I missed that. |
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 1158 Location: San Diego, California
|
Posted: Mon Nov 16, 2009 9:31 pm Post subject: |
|
|
FYI sometimes I just look at the catalog
http://www.autohotkey.com/docs/commands
In the helpfile it is under the Contents tab about 12th on the list.
Alphabetical List of Command.
I think of the old TV series "Mission: Impossible"
The leader looks at the list of experts available and chooses the ones that have the skills needed.
Also, under the "input" comamnd is a list called "related"
KeyWait, Hotstrings, InputBox, #InstallKeybdHook, Threads, if var in/contains MatchList |
|
| Back to top |
|
 |
|