Jump to content
Sign in to follow this  
AustrianOak

HotKeySet()

Recommended Posts

AustrianOak

I'm trying to set a Ctrl+p as one of my hotkeys and this is what I did:

HotKeySet("{^}+{p}", "Func1")

I know I have to be way off and am tired of guessing as I didn't find any example in the helpfile of setting multi-key hotkeys.

Idk, maybe I'm blind and there are examples.

In need of help.

Share this post


Link to post
Share on other sites
SmOke_N

"^p"


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
SmOke_N

("+p")

That's {SHIFT}p

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
AustrianOak

Much thanks Smoke_N. And thanks Pain for your effort. :P

:)

Edited by nowagain

Share this post


Link to post
Share on other sites
Xantioss

Much thanks Smoke_N. And thanks Pain for your effort. :D

:)

just my litle effort to this topic,

'!'
This tells AutoIt to send an ALT keystroke, therefore Send("This is text!a") would send the keys "This is text" and then press "ALT+a".

N.B. Some programs are very choosy about capital letters and ALT keys, i.e. "!A" is different to "!a". The first says ALT+SHIFT+A, the second is ALT+a. If in doubt, use lowercase!

'+'
This tells AutoIt to send a SHIFT keystroke, therefore Send("Hell+o") would send the text "HellO". Send("!+a") would send "ALT+SHIFT+a".

'^'
This tells AutoIt to send a CONTROL keystroke, therefore Send("^!a") would send "CTRL+ALT+a".

N.B. Some programs are very choosy about capital letters and CTRL keys, i.e. "^A" is different to "^a". The first says CTRL+SHIFT+A, the second is CTRL+a. If in doubt, use lowercase!

'#'
The hash now sends a Windows keystroke; therefore, Send("#r") would send Win+r which launches the Run dialog box.

HotKeySet("{^}{p}", "Func1")

should do the trick :P

I love documentation!! :P

Edited by Xantioss

Share this post


Link to post
Share on other sites
Richard Robertson

It's not {^}{p}. It's just ^p.

When you use the { } it will use the character as a character. You need to use it without brackets like Smoke said earlier.

Edited by Richard Robertson

Share this post


Link to post
Share on other sites
Kiti

It's not {^}{p}. It's just ^p.

When you use the { } it will use the character as a character. You need to use it without brackets like Smoke said earlier.

Nowagian, you can use brakets when you need to press a button like: {ENTER}, {DOWN}, {LEFT} etc. :)

Share this post


Link to post
Share on other sites
Richard Robertson

Those are for special keys that don't have character representation, or to escape a character with a special property.

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  

×