lopolop Posted September 2, 2005 Share Posted September 2, 2005 first id like to say hello... but anyways i have just dl'd autoit 2 days ago and seems pretty easy to learn... no for my question is i am trying to build my skills here just doing random programming stuff but i am tring to make a autologin program for the game Diablo II but i cant seem to figure a more efficient way then sleeping(which sucks) to wait for a new screen to show.. like it runs D2 then click's coordinate the types username (Tab) password (enter) then sometimes it takes longer then normal to load but i only use sleep so it dosent work 100%... any help on a better way... -Thanks Link to comment Share on other sites More sharing options...
AutoChris Posted September 2, 2005 Share Posted September 2, 2005 first id like to say hello...but anyways i have just dl'd autoit 2 days ago and seems pretty easy to learn... no for my question is i am trying to build my skills here just doing random programming stuff but i am tring to make a autologin program for the game Diablo II but i cant seem to figure a more efficient way then sleeping(which sucks) to wait for a new screen to show.. like it runs D2 then click's coordinate the types username (Tab) password (enter)then sometimes it takes longer then normal to load but i only use sleep so it dosent work 100%... any help on a better way...-Thanks<{POST_SNAPBACK}>Look for WinWaitActive(), WinWait(), WinExists() ... there are many options available to you other than Sleep(). Link to comment Share on other sites More sharing options...
lopolop Posted September 2, 2005 Author Share Posted September 2, 2005 yes i know about that but the problem is there is only one window name Diablo II and there was no text thing when i used autoit info window Link to comment Share on other sites More sharing options...
AutoChris Posted September 2, 2005 Share Posted September 2, 2005 yes i know about that but the problem is there is only one window name Diablo II and there was no text thing when i used autoit info window<{POST_SNAPBACK}>I have never played the game, but there are other "tricks" you can use to wait for the window to load. 1. Wait for the window to load (in whatever way you want) then MouseGetCursor() to see if it has finished loading by checking to see if the hour glass disappears.2. Check any changed pixels if there is a splash screen and then a logon screen. You can use PixelSearch() if a new type of window appears or even if there is some altered coloring in the logon window.3. Use Opt ("WinDetectHiddenText", 1) in case there is any text that you can see via AutoIt Info window. Sometimes selecting a control (not clicking it, but focusing on it) will show any hidden text. In that case, ControlFocus() and ControlGetText() could help.4. Rename the main window to something other than Diablo II with WinSetTitle() and then you will not get the main window confused with any sub-windows you are trying to detect.There are many other possibilities to try. These are just a few that popped into my head. Good luck with your script and I hope that I was able to help in some small way. 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