danusko Posted September 26, 2005 Share Posted September 26, 2005 Hi everybody, please i want to do a script i want make with one hot key , f.e. win+a - two function , f.e. when i press once win+a it will makes "up" and when i press win+a twice it makes "down" is it possible? thanks for your advise Link to comment Share on other sites More sharing options...
danusko Posted September 26, 2005 Author Share Posted September 26, 2005 (edited) global booleanOkbut, where i define my two function?i see only one possibility to define a function. Or?thanke youthis doesnt works$g_bSet = 0HotKeySet("^a","sendkey")While 1 Sleep(10)WEndFunc sendkey()send ("{up}")send ("{down}")EndFunc Edited September 26, 2005 by danusko Link to comment Share on other sites More sharing options...
peethebee Posted September 26, 2005 Share Posted September 26, 2005 Hi! The trick should be to define one function (connected to the hotkey) and then divide inside of this margin func to two different funcs which you can easily call depending of the result of your calcualtions. Good luck, peethebee vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Link to comment Share on other sites More sharing options...
danusko Posted September 27, 2005 Author Share Posted September 27, 2005 I have it look: $g_bSet = 0 HotKeySet("^!+","MyFunc") While 1 Sleep(10) WEnd Func MyFunc() $g_bSet = Not $g_bSet if $g_bSet= "true" then send("^!{end}") else send("^!{home}") endif EndFunc thanke you guys 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