jmHoekst Posted September 5, 2008 Share Posted September 5, 2008 hello,I am trying to simulate a Control + Pause keystroke combination. I have tried several things:Send ( "{CTRLDOWN}" )Send ( "{PAUSE}" )Send ( "{CTRLUP}" )also...Send ( "{LCTRL} & {PAUSE} )also...Send ( "^{PAUSE}" )I have even tried using {BREAK} instead of {PAUSE} since they are the "same key", but to no avail. None of the above have worked, so I am beginning to wonder if my software that requires the ctrl+pause keystroke is being picky for some reason. Any and all help or even comments are very appreciated. Thank you. Link to comment Share on other sites More sharing options...
ReaImDown Posted September 5, 2008 Share Posted September 5, 2008 hello,I am trying to simulate a Control + Pause keystroke combination. I have tried several things:Send ( "{CTRLDOWN}" )Send ( "{PAUSE}" )Send ( "{CTRLUP}" )also...Send ( "{LCTRL} & {PAUSE} )also...Send ( "^{PAUSE}" )I have even tried using {BREAK} instead of {PAUSE} since they are the "same key", but to no avail. None of the above have worked, so I am beginning to wonder if my software that requires the ctrl+pause keystroke is being picky for some reason. Any and all help or even comments are very appreciated. Thank you.send("{LCTRL Down}")Send("{PAUSE}")Send("{LCTRL Up}") [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
jmHoekst Posted September 5, 2008 Author Share Posted September 5, 2008 ReaImDown, Thank you for your reply. Your suggestion did not work for me. Here is some more information: my software will pause if the PAUSE key is pressed, but my software will shut down if CTRL + PAUSE is pressed. When I run your code, it behaves as if the PAUSE key was pressed without the CTRL key being held down. My software pauses, but does not shut down. Any other ideas? Thanks again. Link to comment Share on other sites More sharing options...
ReaImDown Posted September 5, 2008 Share Posted September 5, 2008 ReaImDown,Thank you for your reply. Your suggestion did not work for me. Here is some more information: my software will pause if the PAUSE key is pressed, but my software will shut down if CTRL + PAUSE is pressed. When I run your code, it behaves as if the PAUSE key was pressed without the CTRL key being held down. My software pauses, but does not shut down. Any other ideas? Thanks again.show me your hotkeyset() [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
jmHoekst Posted September 5, 2008 Author Share Posted September 5, 2008 Lol, sorry I am such a newb. What is a hotkeyset()? This is my entire script that I have compiled to an .exe that I run:WinActivate( "SoftwareName" )sleep( 5000 );Simulate a "Ctrl" + "Pause" keystrokeSend ( "{LCTRL DOWN}" )sleep ( 500 )Send ( "{PAUSE}" )sleep ( 500 )Send ( "{LCTRL UP}" );Wait ten seconds for I/O to completesleep( 10000 );Simulate a "Y" and then "Enter" to confirm termination of the batch fileSend ("y")sleep ( 500 )Send ( "{ENTER}" )sleep ( 1000 ) Link to comment Share on other sites More sharing options...
ReaImDown Posted September 5, 2008 Share Posted September 5, 2008 Lol, sorry I am such a newb. What is a hotkeyset()? This is my entire script that I have compiled to an .exe that I run:WinActivate( "SoftwareName" )sleep( 5000 );Simulate a "Ctrl" + "Pause" keystrokeSend ( "{LCTRL DOWN}" )sleep ( 500 )Send ( "{PAUSE}" )sleep ( 500 )Send ( "{LCTRL UP}" );Wait ten seconds for I/O to completesleep( 10000 );Simulate a "Y" and then "Enter" to confirm termination of the batch fileSend ("y")sleep ( 500 )Send ( "{ENTER}" )sleep ( 1000 )pause doesnt pause and theres nothing there saying CTRL + Pause will quit. [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u] Link to comment Share on other sites More sharing options...
jmHoekst Posted September 5, 2008 Author Share Posted September 5, 2008 So, the command: Send( "{PAUSE}" ) doesn't simulate the PAUSE key being pressed? Is that what you are saying, or am I misunderstanding you? Also, my software is the one who says that CTRL + Pause will quit, because that is what my software requires. When I stop my software manually, I simply activate the window, hold down the Ctrl key and press Pause. This is what I'm trying to accomplish. I don't know what a hotkeyset() is, but if it's something I need, I'll do it. Thanks. Link to comment Share on other sites More sharing options...
DW1 Posted September 5, 2008 Share Posted September 5, 2008 pause doesnt pause and theres nothing there saying CTRL + Pause will quit.He isn't trying to quit his script, rather the one his script is controlling.CTRL + Pause = Send("^{pause}") AutoIt3 Online Help Link to comment Share on other sites More sharing options...
jmHoekst Posted September 8, 2008 Author Share Posted September 8, 2008 Hello danwilli, Sorry, but Send("^{PAUSE}") did not end up working for me. However, it did inspire me to try Send("^{BREAK}"), which did end up working. Thanks for the help guys. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now