Kapli Posted March 9, 2009 Posted March 9, 2009 Send() and Mouseclick() works fine, but I want to be able to do other things while it runs in the background. So I tried expandcollapse popup$hWin = WinGetHandle("[CLASS:SFMainWindow; TITLE:Darkfall Online]") While 1 ControlSend ($hWin, "", "", "{SPACE}") Sleep(2000) ControlSend ($hWin, "", "", "r") Sleep(2000) ControlSend ($hWin, "", "", "6") Sleep(2000) ControlClick ($hWin, "", "", "left") Sleep(5000) ControlSend ($hWin, "", "", "5") Sleep(2000) For $i = 13 To 1 Step -1 ControlClick ($hWin, "", "", "left") Sleep(3000) Next Sleep(2000) ControlSend ($hWin, "", "", "6") Sleep(2000) ControlClick ($hWin, "", "", "left") Sleep(5000) ControlSend ($hWin, "", "", "5") Sleep(2000) ControlClick ($hWin, "", "", "left") Sleep(3000) ControlClick ($hWin, "", "", "left") Sleep(3000) ControlClick ($hWin, "", "", "left") Sleep(3000) ControlClick ($hWin, "", "", "left") Sleep(3000) ControlSend ($hWin, "", "", "r") Sleep(2000) ControlSend ($hWin, "", "", "7") Sleep(2000) ControlClick ($hWin, "", "", "left") Sleep(150000) WEnd Could anyone tell me what I did wrong? Thanks in advance.
Zedna Posted March 9, 2009 Posted March 9, 2009 (edited) You must fill third parameter ClassNameNN of ControlSend(),ControlClick() to be able correctly work also in background. Edited March 9, 2009 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Authenticity Posted March 9, 2009 Posted March 9, 2009 Can you upload screeny of the control tab of "AutoIt Window Info" or post what you see there?
Kapli Posted March 9, 2009 Author Posted March 9, 2009 (edited) Servers are down now so I can't get a screenshot but I remember doing it earlier and most of it was empty except the Handle and ExStyle that's what I remember. Edit: Ok I just checked, the control tab is empty except Handle. Edited March 9, 2009 by Kapli
rmp459 Posted March 9, 2009 Posted March 9, 2009 I was trying to do something similar... but i am a complete beginner when it comes to this.... The Control Tab is completely empty except for a value for Handle I used your script as a starter for mine....this is what I was trying to do... Quote $bootleg=1337 Global $Paused HotKeySet("{Pause}","TogglePause") $hWin=WinGetHandle("[CLASS:SFMainWindow; TITLE:Darkfall Online]") If @error Then MsgBox(4096, "Error", "Could not find the Darkfall window") Else ControlClick($hWin,"","","right") While $bootleg = 1337 For $i = 50 to 1 Step -1 ControlClick($hWin,"","","left") Sleep(11500) Next ControlSend($hWin,"","","{R}") Sleep(1000) ControlSend($hWin,"","","{0}") Sleep(1000) ControlClick($hWin,"","","left") Sleep(180000) ControlSend($hWin,"","","{W}") Sleep(3000) ControlSend($hWin,"","","{R}") Sleep(1000) Opt("SendKeyDownDelay", 1500) ControlSend($hWin,"","","{Down}") Sleep(1000) Opt("SendKeyDownDelay") WEnd endif ;;PauseButton Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) WEnd EndFunc
rmp459 Posted March 9, 2009 Posted March 9, 2009 Kapli said: Well, did it work? ;PNope... doesnt seem that darkfall is compatible... if you really need to run the macros in the background i suggest vmware as a possible solution for the time being.
Kapli Posted March 9, 2009 Author Posted March 9, 2009 rmp459 said: Nope... doesnt seem that darkfall is compatible... if you really need to run the macros in the background i suggest vmware as a possible solution for the time being.Yeah I just thought of that, downloading as we speak
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