Jump to content
Sign in to follow this  
jmHoekst

Ctrl + Pause ... can it be done?

Recommended Posts

jmHoekst

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.

Share this post


Link to post
Share on other sites
ReaImDown

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]

Share this post


Link to post
Share on other sites
jmHoekst

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.

Share this post


Link to post
Share on other sites
ReaImDown

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]

Share this post


Link to post
Share on other sites
jmHoekst

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" keystroke

Send ( "{LCTRL DOWN}" )

sleep ( 500 )

Send ( "{PAUSE}" )

sleep ( 500 )

Send ( "{LCTRL UP}" )

;Wait ten seconds for I/O to complete

sleep( 10000 )

;Simulate a "Y" and then "Enter" to confirm termination of the batch file

Send ("y")

sleep ( 500 )

Send ( "{ENTER}" )

sleep ( 1000 )

Share this post


Link to post
Share on other sites
ReaImDown

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" keystroke

Send ( "{LCTRL DOWN}" )

sleep ( 500 )

Send ( "{PAUSE}" )

sleep ( 500 )

Send ( "{LCTRL UP}" )

;Wait ten seconds for I/O to complete

sleep( 10000 )

;Simulate a "Y" and then "Enter" to confirm termination of the batch file

Send ("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]

Share this post


Link to post
Share on other sites
jmHoekst

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.

Share this post


Link to post
Share on other sites
DW1

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}")

Share this post


Link to post
Share on other sites
jmHoekst

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.