Unweighted Posted August 5, 2014 Posted August 5, 2014 (edited) Do $Search1 = _ImageSearch('img1.bmp', 0, $X, $Y, 0) Sleep(100) Until $Search1 = 1 Sleep(100) MouseClick("LEFT",$X,$Y,1,1) Hi guys, I have this code and I would like it to keep left clicking on the image until another one is found. Any ideas on what I need to do? Help is appreciated, thank you Edited August 5, 2014 by Unweighted
Xenobiologist Posted August 5, 2014 Posted August 5, 2014 What about a little if statement. If image found then MouseClick else ... put that in the loop. 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
Unweighted Posted August 5, 2014 Author Posted August 5, 2014 What about a little if statement. If image found then MouseClick else ... put that in the loop. Do If $Search1 = _ImageSearch('img1.bmp', 0, $X, $Y, 0) Then Sleep(100) MouseClick("LEFT",$X,$Y,1,1) Until $Search2 Something like this or? :S sorry very new to AutoIt
Moderators JLogan3o13 Posted August 5, 2014 Moderators Posted August 5, 2014 You say keep clicking on the image until another one is found. What triggers the other image to appear, or what does the window look like? There may be a much easier way to announce the appearance of the second image than an ImageSearch. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Unweighted Posted August 5, 2014 Author Posted August 5, 2014 (edited) Explain more please Edited August 5, 2014 by Unweighted
Moderators JLogan3o13 Posted August 5, 2014 Moderators Posted August 5, 2014 Hi, Unweighted. How about posting what you did to resolve it. This may help someone searching on the same issue in the future "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Unweighted Posted August 5, 2014 Author Posted August 5, 2014 (edited) Do $Search4 = _ImageSearch('img1.bmp', 0, $X, $Y, 0) Sleep(100) Until $Search4 = 1 Sleep(1000) MouseMove($X, $Y, 1) MouseClick("left") popup() $xx = 0 $yy = 0 Do $Search5 = _ImageSearch('img2.bmp',1,$xx, $yy,0) MouseMove($X, $Y, 1) Sleep(700) MouseClick("left") until $Search5 = 1 Sleep(7000) MouseMove($xx, $yy, 1) Sleep(7000) MouseClick("left") Someone suggested that I use something like this, but it doesn't seem to be working... Edited August 5, 2014 by Unweighted
November Posted August 6, 2014 Posted August 6, 2014 Do $Search4 = _ImageSearch('img1.bmp', 0, $X, $Y, 0) Sleep(100) Until $Search4 = 1 Sleep(1000) MouseMove($X, $Y, 1) MouseClick("left") popup() $xx = 0 $yy = 0 Do $Search5 = _ImageSearch('img2.bmp',1,$xx, $yy,0) MouseMove($X, $Y, 1) Sleep(700) MouseClick("left") until $Search5 = 1 Sleep(7000) MouseMove($xx, $yy, 1) Sleep(7000) MouseClick("left") Someone suggested that I use something like this, but it doesn't seem to be working... Hi there, I think you didnt post everything. I don't see any code error of this snippet. Try to share a little more and your goal. Cheers. Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font]
Blue_Drache Posted August 6, 2014 Posted August 6, 2014 What website or program are you trying to automate? What you're doing sounds very suspicious and you're talking around the questions. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
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