Jump to content
Sign in to follow this  
apollo13

Problem using command "HotKeySet"

Recommended Posts

apollo13

I have a problem using command "HotKeySet"

I want that pressing on keyboard "CTRL" & "ESC" the program close process & exit but don't Run.

This is an example.

Run("calc.exe")

While 1

HotKeySet("^{ESC}", "EndAll")

Sleep(100)

Wend

Func EndAll()

processclose("calc.exe")

Exit(0)

EndFunc

---> I have proved to change "^" that is "CTRL" with {LCTRL} but nothing to do

If I change button option " ^ "

with "+" ----> "SHIFT" & "ESC" run very well

with "!" ----> "ALT" & "ESC" run very well

Is not possible combine "CTRL/ESC" ???

Thanks

Share this post


Link to post
Share on other sites
subzerostig

Ctrl-Esc is a system hotkey for the start menu, so no, you cannot combine them. There might be ways round, such as ending explorer.exe(not recommended) but you shouldn't intefere with other programs hotkeys.

Also, you don't need to set a hotkey every 100ms. You only need to set it once.


There are 10 types of people in this world. Those that understand binary, and those that do not

Share this post


Link to post
Share on other sites
apollo13

Thank you vey much for council.

best regards

Share this post


Link to post
Share on other sites
aurm

I'm having a problem when trying to set hotkeys with numbers , i.e : "^w{1}" which resembles a Ctrl+W+1 , but it doesn't work for me , when I reach the letter 'W' the function registered with the hotkey is called , without waiting for the last digit '1' , any idea ?

Share this post


Link to post
Share on other sites
czardas

I don't think you can combine those keys. Use CTRL + KEY, CTRL + SHIFT + KEY, ALT + KEY etc...

You may like to try Manadar's

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.