Jump to content

Help with Guild Wars Script - Logging in

Recommended Posts

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 :lmao: )

Edited by Term!nX
Link to post
Share on other sites


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.

Link to post
Share on other sites


first of all try to find something to identify whether it fails or not.

So long,


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

Link to post
Share on other sites


heres a screen with a failed Log-In:


heres the one with successful Log-In:


Just 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




The 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.


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 by Term!nX
Link to post
Share on other sites

I have never done this pixel stuff before, so please correct me if I'm wrong, but something like this might work...

(Send login)
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

Link to post
Share on other sites

Opt("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.

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)
                $data &= StdOutRead($pid)
            Until @error
        Return SetError(2, 0, 0)
    $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)
        Return Run($split[1] & " " & $parameters, '', @SW_MAXIMIZE)
    Return SetError(1, 0, 0)

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
            MsgBox(0, "Success", "Login Succesfull.")
            $loop = 0

Func _Quit()
    If ProcessExists("Gw.exe") Then


[quote name='AceLoc']I gots new sunglasses there cool.[/quote]

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...