Jump to content

Recommended Posts

Posted

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.

Posted

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]
Posted

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.

Posted

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]
Posted

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 )

Posted

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]
Posted

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.

Posted

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.

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
×
×
  • Create New...