Jimbo Posted September 5, 2005 Share Posted September 5, 2005 Hello AllThis is my 1st time on these Boards, Hooray!Now, Lets get down to BusinessIm am trying to Create an Auto Login script for Mu Online.Could Anybody Please help me do this? i made a very basic one, my 1st ever try LOL, failed Misrablellyexpandcollapse popup; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 ; Author: Jimbo <********@hotmail.com> ; ; Script Function: ; Template AutoIt script. ; ; ---------------------------------------------------------------------------- ; Script Start - Add your code below here' ;Wait X amount of milliseconds before starting 3600000 = 1 Hour ;Sleep (3600000) ;Run Mu.exe Run ("C:\Program Files\Webzen\Mu\Mu.exe", "C:\Program Files\Webzen\Mu") ;Wait for Connect Button Sleep (10000) ;Click Connect Button MouseClick("left", 636, 683, 2) ;Wait Until Server is Loaded ;Sleep (60000) ;Click On Maya MouseClick("left", 512, 388, 2) ;Select Server 4 MouseClick("left", 669, 379, 2) ;Wait For Pw Screen ;Sleep (5000) ;Send Password Send ( "******" , 1 ) ;Press Enter Send ("Enter",0) ;Wait For Characters ;Sleep (5000) ;Click on DK MouseClick("left", 258, 531, 2) ;Click OK MouseClick("left", 790, 251, 2) ;Wait to Load ;Sleep (10000) ;Press F11 Send("F11",0) ;Press Enter Send ("Enter",0) ;/Request off Send ( "/request off" , 1 ) ;Press Enter Send ("Enter",0) ;Start Bot (Press NumPad7) Send ("NUMPAD7",0) ;End of Auto Connect Bot Made by Jimbo!!!! ;Server 1 ;MouseClick("left", 969, 353, 2)Lol, i think i missed a few things....i laugh at my own failure lol....ScreenShots Included1) Need to run Main exe Run ("C:\Program Files\Webzen\Mu\Mu.exe", "C:\Program Files\Webzen\Mu")<--Works1) Connect Button, Co Ords Are 636, 683, Needs To Be clicked after opening, (Need to Wait for connect button to appear) 5~10 Seconds, Then wait about 40 Seconds before continuing to step 22) Need to Click on "Maya" (512, 388) And then "Server 4" (669, 379)3) Need to wait for Password Area to Show (Again 5~10 Seconds)4) Need to type in Password, then Press Enter5) Needs to click MouseButton at (258, 531) For my character, and then Ok (790, 251)6) Needs to Press enter & Type "/request off" and then enter again7) Needs to Press F11 And then wait 5 seconds before pressing Numpad76)Need to wait 5~10 Seconds to LoadWell, For my 1st ever script.. (can it be called a script?) Lol.. oh well i gues you dont get anywhere without asking for help!!Jimbo Link to comment Share on other sites More sharing options...
LxP Posted September 5, 2005 Share Posted September 5, 2005 Welcome to the forums!This is a fantastic first effort but here are some pointers:You may be able to wait for the connect button using a PixelGetColor() call in a While..WEnd loop -- i.e. check the colour of a pixel on the screen while that pixel does not match a certain colour.Your Send("Enter", 0) line should probably be Send("{ENTER}").Similarly you will need to correct the lines that send F11 and NumPad 7.Good luck getting it to work the way you want! Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 5, 2005 Moderators Share Posted September 5, 2005 Welcome the forum Jimbo Are your coords Screen|Client|Window ? (AutoInfo) Do your program windows have Titles or Class? (AutoInfo) Does your input box have a Control ID or ClassNameNN? (AutoInfo) Where exactly does it fail at (I assume it's the second (1)? Have you tried to remove or lessen the sleep to test it? Do you want this to run every hour or just the 1 time after an hour? In the AutoInfo tool, under options, then under Coord Mode... what is checked. If it is Screen Coords and you do have a Title or Class, might I suggest making them client coords... then it looks like it would be just a few 'Clicks' away for us to help . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Jimbo Posted September 5, 2005 Author Share Posted September 5, 2005 (edited) Welcome the forum Jimbo Are your coords Screen|Client|Window ? (AutoInfo)Do your program windows have Titles or Class? (AutoInfo)Does your input box have a Control ID or ClassNameNN? (AutoInfo)Where exactly does it fail at (I assume it's the second (1)? Have you tried to remove or lessen the sleep to test it?Do you want this to run every hour or just the 1 time after an hour?In the AutoInfo tool, under options, then under Coord Mode... what is checked. If it is Screen Coords and you do have a Title or Class, might I suggest making them client coords... then it looks like it would be just a few 'Clicks' away for us to help .<{POST_SNAPBACK}>CoOrds = ScreenTitle: MU Auto UpdateClass: #32770Control ID: 1999ClassNameNN: Button2Well, Ill put it his way, i want to make the script because On tuesdays after i go to school, 1 hour later there is server maintenence, which also goes for 1 hour, u want to go to school then i can get it to connect me in X amount of hours, Btw, in game, As seen in my screenshots, Where is says "Maya" and "Wigle" Everything in AutoInfo Tool is blank.... except the mouse details*EDIT* With the Script too, The connect Button bit works fine, But it seems when it come to clicking on "Maya" and "Server 4", The Mouse Will not move Edited September 5, 2005 by Jimbo Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 5, 2005 Moderators Share Posted September 5, 2005 Cool... I'll have a look for you... are all the screen name titles the same? And does the Input box where you put your username / and password have a control ID? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Jimbo Posted September 5, 2005 Author Share Posted September 5, 2005 (edited) Cool... I'll have a look for you... are all the screen name titles the same?And does the Input box where you put your username / and password have a control ID?<{POST_SNAPBACK}>No, The box where i have to click Connect is called MU Auto UpdateWhen im in the game and have to select server, its called MUNo Control ID on the pw Box, Just looks like the screenie below, empty..Screenies Attached Edited September 5, 2005 by Jimbo Link to comment Share on other sites More sharing options...
Gaboury Posted September 5, 2005 Share Posted September 5, 2005 Hi buddy! Run ("C:\Program Files\Webzen\Mu\Mu.exe", "C:\Program Files\Webzen\Mu") No need to put the path after, just do Run("C:\Program Files\Webzen\Mu\Mu.exe") I am a noob too but I suggest you do that because the less there is code the easier is to understand it I wish you good luck with your scripts - Gaboury. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 5, 2005 Moderators Share Posted September 5, 2005 Sorry, I got tied up for a bit: Try this... I tried to comment it out a bit for you.. but I was in bit of a rush. expandcollapse popup; Script Start - Add your code below here' ;Wait 1 Hour Global $WINDOW = "MU" Opt("WINTITLEMATCHMODE", 4); IF WE USE TITLES, WE SHOULD MAKE SURE WE KNOW HOW WE WANT TO LOOK FOR THEM Opt("MOUSECOORDMODE", 2); DEFAULT MOUSECLICKS ARE SET TO 0, YOU ARE USING CLIENT COORDS, THAT SHOULD BE 2 ; JUST A DIFFERENT WAY TO BE MORE PRECISE W/ THE TIMING $TIMER = TimerInit() Do Sleep(100); NOT BURNING OUT THE CPU / CHECKS 1/10TH OF A MILLESECOND TO SEE IF THE HOUR IS UP Until (TimerDiff($TIMER) / 1000) / 60 >= 60;<< 60 REPRESENTS 60 MINUTES #CS AFTER THE HOUR IS UP NOW THE REST OF YOUR SCRIPT WILL RUN I'M NOT CHANGING ANY OF YOUR SCRIPT EXCEPT THE SEND'S... TO MAKE SURE THERE ARE NO OTHER ERRORS SINCE I DON'T HAVE THE PROGRAM TO TEST FOR MYSELF #CE Run ("C:\Program Files\Webzen\Mu\Mu.exe", "C:\Program Files\Webzen\Mu") ;Wait for Connect Button WinWaitActive($WINDOW, "", 10); WAITS FOR THE WINDOW TO EXIST AND BE ACTIVE FOR 10 SECONDS ;Click Connect Button MouseClick("left", 636, 683, 2, 1); ADDED THE ONE ON THE END FOR SPEED... IF YOU DON'T NEED IT REMOVE IT AND THE COMMA BEFORE IT ;Wait Until Server is Loaded ;Sleep (60000) ;If Not WinActive($WINDOW) Then WinActivate($WINDOW) ;Click On Maya MouseClick("left", 512, 388, 2, 1) ;Select Server 4 MouseClick("left", 669, 379, 2, 1) ;Wait For Pw Screen ;Sleep (5000) ;Send Password Send ("******" , 1 ) ;Press Enter Send ("{ENTER}") ;Wait For Characters ;Sleep (5000) ;Click on DK MouseClick("left", 258, 531, 2, 1) ;Click OK MouseClick("left", 790, 251, 2, 1) ;Wait to Load ;Sleep (10000) ;Press F11 Send("{F11}") ;Press Enter Send ("{ENTER}") ;/Request off Send ("/request off", 1) ;Press Enter Send ("{ENTER}") ;Start Bot (Press NumPad7) Send ("{NUMPAD7}") ;End of Auto Connect Bot Made by Jimbo!!!! ;Server 1 ;MouseClick("left", 969, 353, 2, 1) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 5, 2005 Moderators Share Posted September 5, 2005 Good point Gaboury, I didn't even look at that since he said it worked . Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Jimbo Posted September 5, 2005 Author Share Posted September 5, 2005 (edited) Can u make it again without the sleep parts so i can test it directly without having to wait an hour, not sure what to edit lol *Figured it out* Edited September 5, 2005 by Jimbo Link to comment Share on other sites More sharing options...
Jimbo Posted September 5, 2005 Author Share Posted September 5, 2005 Hi buddy!Run ("C:\Program Files\Webzen\Mu\Mu.exe", "C:\Program Files\Webzen\Mu")No need to put the path after, just do Run("C:\Program Files\Webzen\Mu\Mu.exe")I am a noob too but I suggest you do that because the less there is code the easier is to understand it  I wish you good luck with your scripts - Gaboury.<{POST_SNAPBACK}>You need the extra "C:\Program Files\Webzen\Mu", if you dont you get a Mesage error which means you cant run the client Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 5, 2005 Moderators Share Posted September 5, 2005 So did you get it to work Jimbo? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Jimbo Posted September 5, 2005 Author Share Posted September 5, 2005 No =( Was talking to tumbleweed, and he said something about autoit cannot move the mouse while running MU, dunno, he will explain it Link to comment Share on other sites More sharing options...
Sokko Posted September 5, 2005 Share Posted September 5, 2005 You need the extra "C:\Program Files\Webzen\Mu", if you dont you get a Mesage error which means you cant run the clientYes, this is how many programs work, and I always include the working directory when I'm running something. If you don't include it, the program assumes that it's being run from the current location of the script (instead of its actual location), and looks in the wrong place for any external files it needs. Link to comment Share on other sites More sharing options...
TuMbLeWeEd Posted September 5, 2005 Share Posted September 5, 2005 You need the extra "C:\Program Files\Webzen\Mu", if you dont you get a Mesage error which means you cant run the client <{POST_SNAPBACK}>Downloaded the game and tested out some stuff.Once the game's screen is up (connected) No cursor control is possible.No mousemove or mouseclick, not even with a dllcall (thats the only one thats actualy failing, the standard autoit one's say there ok, but are not)The dllcall is working when you try it on a normal window, just comment out the game startup and you will see that it dousDon't know off a solution to do it.Run ("C:\Program Files\Webzen\Mu\Mu.exe", "C:\Program Files\Webzen\Mu") WinWaitActive("MU Auto Update","") While ControlGetText("MU Auto Update", "", "Static2") <> "Click connetion button to play game" sleep(100) WEnd While Not ControlCommand ( "MU Auto Update", "Connect", "Button2", "IsEnabled", "" ) sleep(100) WEnd ControlClick ( "MU Auto Update", "Connect", "Button2" ) WinWaitClose( "MU Auto Update","") WinWaitClose("MU launching","") Winwait("MU","") Sleep(20000);can try longer sleeps if the screen is not active yet $move = Mousemove(150,100,50) consolewrite("MouseMove = " & $move &@LF) $click = MouseClick("left", 512, 388, 2, 100) consolewrite("MouseClick = " & $click &@LF) $ret = DllCall("user32.dll","int","SetCursorPos","int",100,"int",100) consolewrite("DllCallMove = " & $ret[0] &@LF) Sleep(1000) WinSetState("MU","",@SW_MINIMIZE );the screen will flash for a second so you know when the script has ended My AutoIt stuffChatBichProjectSelectorWindow control grabberUsefull LinksPort forwarding with routers 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