Coins Posted April 29, 2009 Share Posted April 29, 2009 I've been trying to make the hammerdin teleport to a specific spot, but it will teleport once, and then the second teleport, itll tele in the same spots in, just causing it to be in the same exact spot. It WILL work if you maximize the window, but im trying to keep it minimized, I dont want it to pop up at all unless I do it myself for a reaso expandcollapse popupopt("MouseCoordMode", 2) Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1) Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 Local $MK_RBUTTON = 0x0002 Local $WM_RBUTTONDOWN = 0x0204 Local $WM_RBUTTONUP = 0x0205 Local $WM_MOUSEMOVE = 0x0200 Local $i = 0 Select Case $Button = "left" $Button = $MK_LBUTTON $ButtonDown = $WM_LBUTTONDOWN $ButtonUp = $WM_LBUTTONUP Case $Button = "right" $Button = $MK_RBUTTON $ButtonDown = $WM_RBUTTONDOWN $ButtonUp = $WM_RBUTTONUP EndSelect If $X = "" OR $Y = "" Then $MouseCoord = MouseGetPos() $X = $MouseCoord[0] $Y = $MouseCoord[1] EndIf For $i = 1 to $Clicks DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonDown, _ "int", $Button, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonUp, _ "int", $Button, _ "long", _MakeLong($X, $Y)) Next EndFunc Func _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc HotKeySet("{F1}", "WinMover") HotKeySet("{F2}", "Click1") HotKeySet("{F3}", "Click2") While 1 Sleep(100) WEnd Func WinMover() WinMove("Diablo II", "", 0, 0) Sleep(250) WinSetState("Diablo II", "", @SW_MINIMIZE) EndFunc Func Click1() _MouseClickPlus("Diablo II", "right", 50, 60, 2) EndFunc Func Click2() _MouseClickPlus("Diablo II", "right", 432, 145, 1) EndFunc Link to comment Share on other sites More sharing options...
Coins Posted May 1, 2009 Author Share Posted May 1, 2009 Bump ^^ Link to comment Share on other sites More sharing options...
Coins Posted May 2, 2009 Author Share Posted May 2, 2009 No luck on my side, can't figure it out, bump! Link to comment Share on other sites More sharing options...
FinalVersion Posted May 2, 2009 Share Posted May 2, 2009 Try: ;#Not Tested $TeleportKey = "{F3}" ControlSend("Diablo II", "", "", $TeleportKey) Sleep(200) ControlClick("Diablo II", "", "", "Right", "1", 100, 100) Sleep(200) ControlClick("Diablo II", "", "", "Right", "1", 100, 100) [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
Coins Posted May 2, 2009 Author Share Posted May 2, 2009 Try: ;#Not Tested $TeleportKey = "{F3}" ControlSend("Diablo II", "", "", $TeleportKey) Sleep(200) ControlClick("Diablo II", "", "", "Right", "1", 100, 100) Sleep(200) ControlClick("Diablo II", "", "", "Right", "1", 100, 100) I don't get how I put that in the script, cant you tell me, sorry. Link to comment Share on other sites More sharing options...
Coins Posted May 2, 2009 Author Share Posted May 2, 2009 That isnt working either, because it has to be maximized, or, it just doesnt work for me, do you think you could test? Link to comment Share on other sites More sharing options...
Coins Posted May 3, 2009 Author Share Posted May 3, 2009 I will be paying $$ via paypal if anyone can make this work, if not paypal, I can pay you in some sort of service. 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