Sign in to follow this  
Followers 0
Jon310

Problems with Handle

2 posts in this topic

#1 ·  Posted (edited)

Ok, I have a script that works on notepad but will not work on another program.

Has anyone else have this trouble?

Im not sure if the handles are chainging or whats happening. Are there programs that are hard to get a handle on?

HotKeySet("{NUMPAD7}", "Targetother")
HotKeySet("{NUMPAD8}", "Targetself")
HotKeySet("{NUMPAD9}", "Assist")
HotKeySet("{NUMPAD4}", "Regrowth")
HotKeySet("{NUMPAD5}", "Rejuv")
HotKeySet("{NUMPAD6}", "Heal")
HotKeySet("{NUMPAD1}", "Mount")
HotKeySet("{NUMPAD2}", "Removedebuff")
HotKeySet("{NUMPAD3}", "Moonfire")
HotKeySet("{NUMPAD0}", "Follow")


AutoItSetOption("WinTitleMatchMode", 4)

$handle = WinGetHandle("World of Warcraft", "")

While 1
    Sleep(100)
WEnd

Func Mount()
    ControlSend($handle, "", "", "1")
EndFunc   ;==>Mount

Func Removedebuff()
    ControlSend($handle, "", "", "2");macro: /castsequence Remove Curse, Cure Poison
EndFunc   ;==>Removedebuff

Func Moonfire()
    ControlSend($handle, "", "", "3")
EndFunc   ;==>Moonfire

Func Regrowth()
    ControlSend($handle, "", "", "4")
EndFunc   ;==>Regrowth

Func Rejuv()
    ControlSend($handle, "", "", "5")
EndFunc   ;==>Rejuv

Func Heal()
    ControlSend($handle, "", "", "6")
EndFunc   ;==>Heal

Func Targetother()
    ControlSend($handle, "", "", "9");macro: /target (name of char)
EndFunc   ;==>Targetother

Func Targetself()
    ControlSend($handle, "", "", "{F1}")
EndFunc   ;==>Targetself

Func Assist()
    ControlSend($handle, "", "", "7");macro: /target (name) /assist
EndFunc   ;==>Assist

Func Follow()
    ControlSend($handle, "", "", "8");macro: /target (name) /follow
EndFunc   ;==>Follow

If I start up the first window of the game and load the script. I should be able to load another one and have controlsend send comands to the first window even if its not active. Instead it sends it to the current game window.

This same script works with notepad, with the wingethandle changed.

Please tell me what I'm doing wrong.

Edited by Jon310

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