Sign in to follow this  
Followers 0
Backnor

Hotkey

6 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

WinWait("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

Share this post


Link to post
Share on other sites

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

WinWait("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

Share this post


Link to post
Share on other sites

Thanks ChrisL

Plus Rep

Share this post


Link to post
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
Sign in to follow this  
Followers 0