Jump to content

Code Help


Recommended Posts

Func Terminate()

$isActive = WinWaitActive("Darkages - Windowed by Eru")
$hWnd = WinGetHandle("Darkages")
$winpos = WinGetPos($hWnd)

While $isActive 
    PixelSearch($winpos[0] + 3 + 50, $winpos[1] + 22 + 25, $winpos[0] + 3 + 580, $winpos[1] + 22 + 270, 0x319AFF, 0, 5) 
    Sleep(10)
            else
Send("d5")  

    WEnd
EndFunc

I need some help. Thats what I have so far. Could someone help me with making it, do this. Once it finds that pixel with pixel search it will sleep. Else it sends"d5". Could someone help re-wrok my code to that?

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Well you need an If-Then/Else/Endif loop if you want it to have conditions.

Pseudo-code style: if pixelsearch then sleep, else send ("d5").

Also, do you want it to sleep only for 10 thousandths of a second? Or was that supposed to be in a loop as well (you might not be able to get out if you loop that with no conditions).

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...