Jump to content
Sign in to follow this  
wittenberg

If doesnt work how i want

Recommended Posts

wittenberg

hey guys is their any wrong code? problem is it dont waitin till red+coord or black+coord are true

CODE
HotKeySet("{F4}", "Quit")

Sleep(2000)

$coord = PixelSearch( 0, 0, 890, 109, 0x000000 )

$red = PixelSearch( 727, 57, 780, 65, 0xff0000 )

$black = PixelSearch( 727, 57, 780, 65, 0xfff000 )

MouseClick("left",887,104,1)

sleep(10000)

if $coord = True AND $red = True Then

sleep(500)

Mouseclick("left",410,440,1)

sleep(500)

Mouseclick("left",180,430,1)

ElseIf $coord = True AND $black = True Then

sleep(500)

Mouseclick("left",360,400,1)

sleep(500)

Mouseclick("left",180,430,1)

EndIf

Edited by wittenberg

Share this post


Link to post
Share on other sites
Kip

Putting it in a loop would be nice, now it just checks once and then it closes.

HotKeySet("{F4}", "Quit")



Sleep(2000)

$coord = PixelSearch( 0, 0, 890, 109, 0x000000 )
$red = PixelSearch( 727, 57, 780, 65, 0xff0000 )
$black = PixelSearch( 727, 57, 780, 65, 0xfff000 )

MouseClick("left",887,104,1)
sleep(10000)

While 1

if $coord = True AND $red = True Then

sleep(500)
Mouseclick("left",410,440,1)
sleep(500)
Mouseclick("left",180,430,1)
ElseIf $coord = True AND $black = True Then
sleep(500)
Mouseclick("left",360,400,1)
sleep(500)
Mouseclick("left",180,430,1)

EndIf

WEnd

Share this post


Link to post
Share on other sites
wittenberg

thanks for your help but now he make nothing and is still waiting

edit: i think i have it the coord is a button and if he not pressed the letters are black i tested it with the autoit v3 window info but when i running this script it dont see that its black.

Edited by wittenberg

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  

×