Jump to content

HotKeySet not working [SOLVED]


Recommended Posts

HotKeySet("+", "ticket")
HotKeySet("{TAB}", "arrest")

While 1 = 1
WEnd

Func ticket()
    MouseClick("left")
    Send("{TAB}")
    Send("{TAB}")

EndFunc   ;==>ticket

Func arrest()
    Send("{TAB}")
    Send("{ENTER}")
EndFunc   ;==>arrest

I have this code and it's just not working at all, but if I replace tab and shift with 1 and 2, then it works. Why? Thanks!

Edited by miketh2005
Link to comment
Share on other sites

The shift key can not be used as a hotkey, it's not allowed and/or seen by the program. As to your Tab key not working, not a good idea to use an unmodified key like Tab for a hotkey, and then use it as a key to be sent, I'm sure it's going to screw something up.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

The shift key can not be used as a hotkey, it's not allowed and/or seen by the program. As to your Tab key not working, not a good idea to use an unmodified key like Tab for a hotkey, and then use it as a key to be sent, I'm sure it's going to screw something up.

I see what you mean. I'm trying to make a process faster, and EVERY SECOND COUNTS, literally with this process, so I can't be using combination keys like Shift + 1 etc. its simply not fast enough. I tried using 1 and 2 as hotkeys, but the buttons simply aren't big enough on my keyboard, so sometimes in the heat of the moment when I'm hurrying fast, I press the wrong button, for example I press 2, when I meant to press 1 and then its done for me. Any suggestions, or do I just have to make due with "`" and "1"?

What about the ctrl or alt key?

Edited by miketh2005
Link to comment
Share on other sites

HotKeySet Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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