Sign in to follow this  
Followers 0
Hendricius

Help me correct my script please.

3 posts in this topic

Sleep(5000);
$black = 0
Global $PAUSED = False
HotKeySet("b","beenden");
HotKeySet("p", "TogglePause")


WinActivate("Warcraft III")

While 1;
Sleep(2000);
Send("!q");


    If PixelGetColor(647,926) != $black Then        [b];here the errors occur[/b]
            Do PixelGetColor(647,926)
            Sleep(1000)
            Until PixelGetColor(647,926) = $black
        EndIf

Send("{F10}");
Sleep(500);
Send("!e");
Send("!q");
Send("{ENTER}");
Sleep(2000);

Else Sleep(10000000000);
WEnd

func beenden()
    Exit
EndFunc

The Errormessage is at line 16. Thanks :lmao:

Share this post


Link to post
Share on other sites



Hi,

macht wenig Sinn aber ... Bitteschön:

$black = 0
Global $PAUSED = False
HotKeySet("b", "beenden");
;HotKeySet("p", "TogglePause") ; ist nicht definiert!

WinActivate("Warcraft III")

While 1
    Sleep(2000);
    Send("!q");
    If PixelGetColor(647, 926) <> $black Then
        Do
            Sleep(1000)
        Until PixelGetColor(647, 926) = $black
        Send("{F10}");
        Sleep(500);
        Send("!e");
        Send("!q");
        Send("{ENTER}");
        Sleep(2000);
    Else
        Sleep(10000000000) ; <-- das wartet aber ewig :-)
    EndIf
WEnd

Func beenden()
    Exit
EndFunc   ;==>beenden

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

The Errormessage is at line 16. Thanks :lmao:

Thanks for pointing exactly to the line that causes the error (very helpfull, keep doing that), but what might that error be ? :)

I can make a guess, but somehow I regard that as a lot less precise than hearing the news directly from the horses mouth (that's a saying, not in any way ment negative) :ph34r:

As for my guess ? I think that AI (AuotoIt) just does not know that "!=" means "not equal".

What it expects in such a case is "<>" (lower or higher => not equal).

Hope that helps. :geek:

Share this post


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
Sign in to follow this  
Followers 0