Jump to content

HotKeySet override existing "system" setting


Recommended Posts

Got a new HP WIN7 box so tried a new script language (AutoHotKey). Played with it for a few days and wrote a startup script to assign some hotkeys. But tired of the syntax and then found AutoIT. Rewrote the startup script for AutoIT and it worked, mostly. One hotkey (Ctrl-Alt-s) was already assigned to an HP msgbox displaying system info. AutoHotKey replaced that assignment with mine but AutoIT doesn't seem to be able to unless I'm missing something.

Any help greatly appreciated if it can be done in AutoIT.

Sample of both scripts:

;
;   AutoIT sample
;
#NoTrayIcon
HotkeySet("^!s", "Scout")   ;# Scout            Ctrl-Alt-s
.
.
.
While 1
    Sleep(10000)
WEnd
.
.
.
Func  Scout()
    Send ("Hello World")
EndFunc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

AutoHotKey Sample

#persistent
#notrayicon
#SingleInstance ignore
.
.

^!s::
Send Hello World
Return
.
.
Link to comment
Share on other sites

Bruce,

Thanks for the quick reply but the While loop delay is not the answer. The loop serves as the script's "heartbeat" to keep it alive and thereby keep the Hotkey assignments in effect. Once they have been established, the system reacts effectively immediately to their being pressed.

And I saw no reason to waste CPU cycles needlessly. You can set it to 7200 but you won't have to wait 2 hrs to get a hotkey response. Try it.

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