Athenon Posted June 11, 2007 Share Posted June 11, 2007 Ok, so I have this script set up to minimize and then hide the program and continue to run it but I cannot for the life of me figure out how to get it to right click before doing the other commands. I have been able to get it to right click on the desktop but not in the hidden program also if I could I would like to add coords to click at. I have underlined the area I am having trouble with if anyone can give suggestions or help me out I would be soooooooooo happy. ThanksHotKeySet("{F8}", "hide") HotKeySet("{F10}", "show") AutoItSetOption("WinTitleMatchMode", 4) While 1 Sleep(1000) WEnd Func hide() Global $Show = 0 Global $handle = WinGetHandle("classname=GxWindowClassD3d") WinSetState($handle, "", @SW_MINIMIZE) WinSetState($handle, "", @SW_HIDE) If @error Then MsgBox(0, "error", "couldnt find WoW") Else While 1 $unique = Random(1, 4, 1) If $unique = 1 Then ControlFocus($handle, "", "") ControlClick($handle, "", "", "{RIGHT}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP UP}") ControlSend($handle, "", "", "{DOWN DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{DOWN UP}") Sleep(200000 + Random(5000, 15000, 1)) ElseIf $unique = 2 Then ControlFocus($handle, "", "") ControlClick($handle, "", "", "{RIGHT}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP UP}") ControlSend($handle, "", "", "{DOWN DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{DOWN UP}") Sleep(200000 + Random(5000, 15000, 1)) ElseIf $unique = 3 Then ControlFocus($handle, "", "") ControlClick($handle, "", "", "{RIGHT}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP UP}") ControlSend($handle, "", "", "{DOWN DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{DOWN UP}") Sleep(200000 + Random(5000, 15000, 1)) ElseIf $unique = 4 Then ControlFocus($handle, "", "") ControlClick($handle, "", "", "{RIGHT}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{UP UP}") ControlSend($handle, "", "", "{DOWN DOWN}") Sleep(100 + Random(1, 50, 1)) ControlSend($handle, "", "", "{DOWN UP}") Sleep(200000 + Random(5000, 15000, 1)) EndIf If $Show > 0 Then ExitLoop WEnd EndIf EndFunc ;==>hide Func show() Global $Show = 1 WinSetState("World of Warcraft", "", @SW_SHOW) WinSetState("World of Warcraft", "", @SW_RESTORE) WinActivate($handle, "") EndFunc ;==>show Link to comment Share on other sites More sharing options...
BrettF Posted June 11, 2007 Share Posted June 11, 2007 Why post in 2 different forums?? I don't really see the point Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Athenon Posted June 11, 2007 Author Share Posted June 11, 2007 I realized after I posted i was still in V2 forums and everytime I try and remove it Internet Explorer crashes. Sorry Link to comment Share on other sites More sharing options...
BrettF Posted June 12, 2007 Share Posted June 12, 2007 I realized after I posted i was still in V2 forums and everytime I try and remove it Internet Explorer crashes. Sorrythats cool Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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