Term!nX 0 Posted October 5, 2006 (edited) Hi there! Im pretty new to AutoIt and atm I labor at a script to log automatically in to Guild Wars. I want to implent a MsgBox which tells me if the log in with the password was successfully or not. Example: You try to log in in your scnd account, but you used the password from your first account. So I want to implent a MsgBox which tells you sth. like this: LogIn with pword successful/not successful. Where pword stands for the recently automatically typed password. Another problem for me is, how does the logged in window distinguish from the failed login-window? I thought of pixelsearch.. If somebody could help me, I would say a prayer for you!! (I'm from Germany, so dont get eyecancer ) Edited October 5, 2006 by Term!nX Share this post Link to post Share on other sites
karman 0 Posted October 5, 2006 Hello, You should learn how to use the PixelChecksum() =] Share this post Link to post Share on other sites
Term!nX 0 Posted October 5, 2006 Hello,You should learn how to use the PixelChecksum()=]Hey thx, this looks good. But unfortunately, this is not a solution for me... Because when the log in fails, the whole screen gets a bit darker. And if I log in, the screen changes of course, too. So in both cases the screen changes. Share this post Link to post Share on other sites
Xenobiologist 47 Posted October 5, 2006 HI, first of all try to find something to identify whether it fails or not. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Share this post Link to post Share on other sites
Term!nX 0 Posted October 6, 2006 (edited) Yes,heres a screen with a failed Log-In:http://www.gwebspace.de/zocktempel/Fehlgeschlagen.JPGheres the one with successful Log-In:http://www.gwebspace.de/zocktempel/Geglueckt.JPGJust an idea:When I look for a pixelcolour, which only appears in the logged in screen, I could try sth like this:While 1 do LogIn() PixelSearch()EndLoopThe time, when it tries to log in I could search every 100ms for the specific Pxelcolour. If found, its logged in. If its not found, the login failed.Possbible?I looked up the PixelSearch function. I found a coordinate which is constantly black and has got the colour 1032. But I do not get, how I can look for this colour in a specific area on the screen. Edited October 6, 2006 by Term!nX Share this post Link to post Share on other sites
AzKay 0 Posted October 6, 2006 Look into PixelGetColor() # MY LOVE FOR YOU... IS LIKE A TRUCK- # Share this post Link to post Share on other sites
Gigglestick 2 Posted October 6, 2006 I have never done this pixel stuff before, so please correct me if I'm wrong, but something like this might work... (Send login) Sleep(2000) If PixelGetColor(357, 332) = 9460062 Then $LoginFailed = True That pixel is the dot in the red exclamation point. If login is successful it might be any color depending on the last toon you logged in as and that race's background, but it won't be black or this particular shade of red. You might also google memory locations. I know people have made some programs that actually monitor variables in WoW's memory. It should be somewhat similar in Guild Wars, at least in concept. My UDFs: ExitCodes Share this post Link to post Share on other sites
Term!nX 0 Posted October 11, 2006 c0deWorm, man you gave me the solution. I really really thank you!!! Also thanks to all the others! Share this post Link to post Share on other sites
dnsi 0 Posted October 14, 2006 HUH??? My Programs:Flip-Flop File Encryption SysyemMULTIPLAYER-SOCKETSERVERHide An Archive In A Picture Share this post Link to post Share on other sites
AceLoc 0 Posted October 14, 2006 expandcollapse popupOpt("WinTitleMatchMode", 2) HotKeySet("{F2}", "_Quit") _FileSearchToRun('Gw.exe', '/s -y -a -x') WinWaitActive("Guild");if this doesnt work, then buy faster PC or replace with Sleep(xxxx). Send("{TAB}Your Accountname{TAB}Yourpassword{ENTER}") WinWaitActive("Guild");see above. _LoginCheck() Func _FileSearchToRun($filename, $parameters = '') Local Const $IDYES = 6 Local $data, $split, $pid Local $drive = DriveGetDrive('FIXED') If Not @error Then For $i = 1 To UBound($drive) -1 $pid = Run(@ComSpec & ' /c Dir ' & $drive[$i] & '\' & $filename & ' /B/S', '', @SW_HIDE, 2) Do $data &= StdOutRead($pid) Until @error Next Else Return SetError(2, 0, 0) EndIf $split = StringSplit(StringStripWS($data, 3), @CRLF, 1) If Not @error Then For $i = 1 To $split[0] If MsgBox(0x40024, 'Run ' & $i & ' of ' & $split[0], $split[$i]) = $IDYES Then Return Run($split[$i] & " " & $parameters, '', @SW_MAXIMIZE) EndIf Next Else Return Run($split[1] & " " & $parameters, '', @SW_MAXIMIZE) EndIf Return SetError(1, 0, 0) EndFunc Func _LoginCheck() Local $loop = 1 While $loop = 1 $a = PixelSearch(0, 0, @DesktopWidth, @Desktopheight, 0xCFD3D0) If Not @error Then MsgBox(0, "Failed", "Wrong Password.") $loop = 0 Else MsgBox(0, "Success", "Login Succesfull.") $loop = 0 EndIf Sleep(100) WEnd EndFunc Func _Quit() If ProcessExists("Gw.exe") Then ProcessClose("Gw.exe") EndIf Sleep(50) Exit EndFunc -Ace [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Share this post Link to post Share on other sites