Backnor Posted July 3, 2008 Share Posted July 3, 2008 I may be way off on this script I have not tried it yet but all I am looking for is if I am doing this correctly and if not where to get the correct way to set up hotkeys. Looking to be able to hit the number 4 and it does func 4 I only need it to do the funk once. this is only to automate the keys to hit after hitting the first key, I will not be afk so no need for any loops HotKeySet("{4}", "combo4") HotKeySet("{5}", "combo5") HotKeySet("^{6}", "combo6") HotKeySet("{9}", "combo9") HotKeySet("{0}", "combo0") Func combo4() Send("{4}") Sleep(1000) Send("{1}") EndFunc ;==>combo4 Func combo5() Send("{5}") Sleep(1000) Send("{1}") EndFunc ;==>combo5 Func combo6() Send("{6}") Sleep(1000) Send("{1}") Sleep(1000) Send("{2}") EndFunc ;==>combo6 Func combo9() Send("{9}") Sleep(1000) Send("{3}") EndFunc ;==>combo9 Func combo0() Send("{0}") EndFunc ;==>combo0 Link to comment Share on other sites More sharing options...
ChrisL Posted July 3, 2008 Share Posted July 3, 2008 You have to unset the hotkey, then Send("4") and whatever else you want to do then when your done at the end of the function reset the hotkey HotKeySet("{4}", "combo4") Func combo4() HotKeySet("{4}") Send("{4}") Sleep(1000) Send("{1}") HotKeySet("{4}", "combo4") EndFunc ;==>combo4 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Backnor Posted July 3, 2008 Author Share Posted July 3, 2008 You have to unset the hotkey, then Send("4") and whatever else you want to do then when your done at the end of the function reset the hotkey HotKeySet("{4}", "combo4") Func combo4() HotKeySet("{4}") Send("{4}") Sleep(1000) Send("{1}") HotKeySet("{4}", "combo4") EndFunc;==>combo4 thank you very much changing it now. Link to comment Share on other sites More sharing options...
Backnor Posted July 3, 2008 Author Share Posted July 3, 2008 Sorry to bother you guys again but this is what I ended up with and it seems to work except the F3 function, oh and I had to put a loop in there so it would keep running. any ideas? expandcollapse popupWinWait("Age of Conan", "") If Not WinActive("Age of Conan", "") Then WinActivate("Age of Conan", "") WinWaitActive("Age of Conan", "") While 1 HotKeySet("{F1}", "combo4") HotKeySet("{F2}", "combo5") HotKeySet("^{F3}", "combo6") HotKeySet("{F6}", "combo9") HotKeySet("{F7}", "combo0") WEnd Func combo4() HotKeySet("{F1}") Send("{4}") Sleep(1000) Send("{1}") HotKeySet("{F1}", "combo4") EndFunc;==>combo4 Func combo5() HotKeySet("{F2}") Send("{5}") Sleep(1000) Send("{1}") HotKeySet("{F2}", "combo5") EndFunc ;==>combo5 Func combo6() HotKeySet("{F3}") Send("{6}") Sleep(1000) Send("{1}") Sleep(1000) Send("{2}") HotKeySet("^{F3}", "combo6") EndFunc ;==>combo6 Func combo9() HotKeySet("{F6}") Send("{9}") Sleep(1000) Send("{3}") HotKeySet("{F6}", "combo9") EndFunc ;==>combo9 Func combo0() HotKeySet("{F7}") Send("{0}") HotKeySet("{F7}", "combo0") EndFunc ;==>combo0 Link to comment Share on other sites More sharing options...
ChrisL Posted July 3, 2008 Share Posted July 3, 2008 You unset the wrong hotkey on F3. The original set was CTRL+F3 You then unset F3 If you don't want it to be CTRL +F3 then Remove the ^ Also don't put the HotkeySet in the main loop Set them then use a sleeping loop expandcollapse popupWinWait("Age of Conan", "") If Not WinActive("Age of Conan", "") Then WinActivate("Age of Conan", "") WinWaitActive("Age of Conan", "") HotKeySet("{F1}", "combo4") HotKeySet("{F2}", "combo5") HotKeySet("^{F3}", "combo6") HotKeySet("{F6}", "combo9") HotKeySet("{F7}", "combo0") While 1 Sleep(1000) WEnd Func combo4() HotKeySet("{F1}") Send("{4}") Sleep(1000) Send("{1}") HotKeySet("{F1}", "combo4") EndFunc;==>combo4 Func combo5() HotKeySet("{F2}") Send("{5}") Sleep(1000) Send("{1}") HotKeySet("{F2}", "combo5") EndFunc ;==>combo5 Func combo6() HotKeySet("^{F3}") Send("{6}") Sleep(1000) Send("{1}") Sleep(1000) Send("{2}") HotKeySet("^{F3}", "combo6") EndFunc ;==>combo6 Func combo9() HotKeySet("{F6}") Send("{9}") Sleep(1000) Send("{3}") HotKeySet("{F6}", "combo9") EndFunc ;==>combo9 Func combo0() HotKeySet("{F7}") Send("{0}") HotKeySet("{F7}", "combo0") EndFunc ;==>combo0 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Backnor Posted July 3, 2008 Author Share Posted July 3, 2008 Thanks ChrisL Plus Rep 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