kingsped Posted May 30, 2010 Share Posted May 30, 2010 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 More sharing options...
somdcomputerguy Posted May 30, 2010 Share Posted May 30, 2010 Lessen the Sleep value, make it 100, or even 10. IDK if that'll do it, but 10000 is more than is necessary anyway. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
kingsped Posted May 30, 2010 Author Share Posted May 30, 2010 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 More sharing options...
somdcomputerguy Posted May 30, 2010 Share Posted May 30, 2010 I'm aware what the While loop delay is for, and what it does. I was just thinking that maybe 10 seconds was too long of a Sleep delay. How do you get two hours out of 7200 ms? That's less than 7 1/2 seconds. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 30, 2010 Share Posted May 30, 2010 You can't take over hot keys without screwing something up. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now