Tool Posted January 9, 2009 Share Posted January 9, 2009 (edited) ok so i want this to work on user1 when im on user2. what i mean is run this script on 1 user on pc then log in and be on a different user aka user2. im pretty sure everything works in this code when im on user2 except "MouseClick("left", 403,405,1) sleep(250) MouseClick("left", 425,476,1) sleep(250)" that part any ideas? keep in mind im really new to autoit. call ("startup") func startup() Run ( "D2BS.EXE","") sleep(600) Run( "C:\Program Files\Diablo II\Diablo II.exe -w") WinWait("Diablo II") WinSetState("Diablo II","",@SW_MINIMIZE) sleep(650) call ("dstart") EndFunc func dstart() MouseClick("left", 403,405,1) sleep(250) MouseClick("left", 425,476,1) sleep(250) ProcessClose("D2BS.exe") WinWait("Diablo II") WinSetState("Diablo II","",@SW_MAXIMIZE) sleep(250) call ("exep") EndFunc func exep() winwait("Diablo II E") Sleep(3000) ProcessClose("game.exe") sleep(3000) call ("startup") EndFunc Edited January 9, 2009 by Tool Link to comment Share on other sites More sharing options...
thenewkid Posted January 9, 2009 Share Posted January 9, 2009 i tryed doing that and i used controlclick and it worked try that some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with Link to comment Share on other sites More sharing options...
Tool Posted January 9, 2009 Author Share Posted January 9, 2009 (edited) i tryed doing that and i used controlclick and it worked try thatim not quite sure in how to do that but ill try Ok -edit- this is what i got but i dont think there is a window name for d2bs so what should i do? im going to test this right now tell me if you think it should work. another-edit- just tested and it says error line -1 exrpession error =/ call ("startup") func startup() Run ( "D2BS.EXE","") sleep(600) Run( "C:\Program Files\Diablo II\Diablo II.exe -w") WinWait("Diablo II") WinSetState("Diablo II","",@SW_MINIMIZE) sleep(650) call ("dstart") EndFunc func dstart() ControlClick("D2BS", "", [, Left [, 1 [, 425[, 405]]]] ) sleep(250) ControlClick("D2BS", "", [, Left [, 1 [, 425[, 476]]]] ) sleep(250) ProcessClose("D2BS.exe") WinWait("Diablo II") WinSetState("Diablo II","",@SW_MAXIMIZE) sleep(250) call ("exep") EndFunc func exep() winwait("Diablo II E") Sleep(3000) ProcessClose("game.exe") sleep(3000) call ("startup") EndFunc Edited January 9, 2009 by Tool Link to comment Share on other sites More sharing options...
Tool Posted January 9, 2009 Author Share Posted January 9, 2009 No one? =[ Link to comment Share on other sites More sharing options...
Developers Jos Posted January 9, 2009 Developers Share Posted January 9, 2009 (edited) these are wrong: ControlClick("D2BS", "",[, Left[, 1[, 425[, 405]]]]) ControlClick("D2BS", "",[, Left[, 1[, 425[, 476]]]])Try using the Full SciTE4Autoit3 and run the script from it with F5. That will first run au3check and report on possible errors. Jos Edited January 9, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Tool Posted January 9, 2009 Author Share Posted January 9, 2009 (edited) these are wrong: ControlClick("D2BS", "",[, Left[, 1[, 425[, 405]]]]) ControlClick("D2BS", "",[, Left[, 1[, 425[, 476]]]])Try using the Full SciTE4Autoit3 and run the script from it with F5. That will first run au3check and report on possible errors. well i dont think its clicking at all =/ Jos Ok i fixed those two lines but it doesnt click where it is supposed to still =[ call ("startup") func startup() Run ( "D2BS.EXE","") sleep(600) Run( "C:\Program Files\Diablo II\Diablo II.exe -w") WinWait("Diablo II") WinSetState("Diablo II","",@SW_MINIMIZE) sleep(650) call ("dstart") EndFunc func dstart() ControlClick("D2BS", "", "Left" , 1 , 425, 405 ) sleep(250) ControlClick("D2BS", "", "Left" , 1 , 425, 476 ) sleep(250) ProcessClose("D2BS.exe") WinWait("Diablo II") WinSetState("Diablo II","",@SW_MAXIMIZE) sleep(250) call ("exep") EndFunc func exep() winwait("Diablo II E") Sleep(3000) ProcessClose("game.exe") sleep(3000) call ("startup") EndFunc Edited January 9, 2009 by Tool 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