Jump to content

HotKeySet()


Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

("+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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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. :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...