mrgy05 Posted May 1, 2013 Posted May 1, 2013 My script seems to be using a large amount of resources (CPU) while waiting to find the pixel or image designated, is there a more efficient way to accomplish my script without resources hogging? expandcollapse popup#include <ImageSearch.au3> $X1 = 0 $Y1 = 0 $X2 = 0 $Y2 = 0 While 1 $pixel = PixelSearch (440,368,491,475, 0xAD0000) if IsArray ($pixel) = True Then Sleep (750) MouseMove($pixel [0], $pixel [1], 1) MouseClick ( "left" ) Sleep (25) Send ("{TAB}") Sleep (25) Send ("{TAB}") Sleep (25) Send ("{SPACE}") Sleep (25) Do $adobeicon = _ImageSearch ('C:\COPY\adobeicon.bmp', 0, $x1, $y1, 20) Sleep (750) Until ($adobeicon) = True Sleep (1000) Send ("^p") Sleep (750) Send ("{ENTER}") MouseMove($X1, $Y1, 1) MouseClick ( "left" ) Do $xbutton = _ImageSearch ('C:\COPY\xbutton.bmp', 0, $x2, $y2, 20) Sleep (250) Until ($xbutton) = True Sleep (1000) MouseMove($X2, $Y2, 1) Sleep (250) MouseClick ( "left" ) Else if IsArray ($pixel) = False Then EndIf EndIf WEnd
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