Souls Posted December 18, 2006 Posted December 18, 2006 Ok so this is my Eternal Wars Autoclicker Beta 3 (or EWAB3) expandcollapse popup;EWAB3 HotKeySet("{F2}", "msn") HotkeySet("{F11}", "HK_STOP") HotKeySet("{DEL}", "quit") Func msn() ;clicks while(1) Sleep(2200) If (PixelGetColor (372, 500) = 0xFF9966) Then Send("{TAB}") Send("{TAB}") Send("{ENTER}") Sleep(350) EndIf If (PixelGetColor (421, 468) = 0x666666) Then Send("{TAB}") Send("{ENTER}") EndIf If (PixelGetColor (442, 478) = 0xFFFFFF) Then Exit EndIf If (PixelGetColor (465, 591) = 0xFFA500) Then Exit EndIf If (PixelGetColor (922, 447) = 0x371617) Then Exit EndIf If (PixelGetColor (442, 483) = 0x371617) Then Exit EndIf $coord = PixelSearch( 440, 482, 677, 536, 0x040204, 0, 2) if @Error = 0 then Exit EndIf WEnd EndFunc ;Stops the program Func HK_STOP() while 1 = 1 Sleep(100) wend EndFunc ;the exit function Func quit() Exit EndFunc TrayTip("Souls Autoclicker", "DELETE= Exit", 5, 1) TraySetIcon("Shell32.dll",112) ; Need to keep the program running until you press the hotkey while(1) sleep(1000) WEnd Ok so my problem is that if i can put two "$coord = PixelSearch( 440, 482, 677, 536, 0x040204, 0, 2) if @Error = 0 then Exit " scripts in the same function and if so how can I make both of them work at the same time?
Glyph Posted December 18, 2006 Posted December 18, 2006 (edited) Try this, If PixelSearch( 0, 0, 20, 300, 0xFFFFFF, 10 ) and PixelSearch( 0, 0, 20, 300, 0xFFA500, 10 ) and PixelSearch( 0, 0, 20, 300, 0x371617, 10 ) and PixelSearch( 0, 0, 20, 300, 0x371617, 10 ) then exit endif I'm sorry, but i have to tell you this isn't the best way to do this type of thing! Edited December 19, 2006 by backstabbed tolle indicium
Souls Posted December 19, 2006 Author Posted December 19, 2006 Hey that didn't work because it closes the program as soon as it finishes searching!!! I need the script that if it finds the color I need to close the program!
Glyph Posted December 19, 2006 Posted December 19, 2006 (edited) Add a While 1 Sleep (Whatever time to check here) wend Edited December 19, 2006 by backstabbed tolle indicium
Richard Robertson Posted December 19, 2006 Posted December 19, 2006 Try using sentences and a real title next time. Using PixelSearch is a slow thing to do. Running several like that will slow everything down.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now