I want to do something if an image is found. If it is not found, I want it to look for another image. And if that image is not found, I want it to look for another image which is defiantly there and click it, then display an error message. My code is this, how can I make it do what I want:
FindImagePos>C:\Documents and Settings\mokshal\MyDocuments\noted.bmp,SCREEN,0,1,X,Y,Note
MouseMove>X_0,Y_0
LClick
Thanks
If Image Is Not Found
Moderators: Dorian (MJT support), JRL
Hi mokshal1663,
Sometimes it is a little sleepy over the weekend.
The last parameter of the FindImagePosition command returns the number of images found.
I have not tested this, but hope it gives you the idea.
Sometimes it is a little sleepy over the weekend.
The last parameter of the FindImagePosition command returns the number of images found.
Code: Select all
Let>docdir=C:\Documents and Settings\mokshal\MyDocuments
FindImagePos>%docdir%\noted.bmp,SCREEN,0,1,X,Y,Note
if>Note>0
MouseMove>X_0,Y_0
LClick
else
FindImagePos>%docdir%\noted2.bmp,SCREEN,0,1,X,Y,Note
if>Note>0
MouseMove>X_0,Y_0
LClick
else
FindImagePos>%docdir%\error.bmp,SCREEN,0,1,X,Y,Error
if>Error>0
MouseMove>X_0,Y_0
LClick
//put code to read the error message here
//or do a screencapture to display it graphically
else
MDL>Can't find the error message
endif
endif
endif
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Dead?
No, the forum is NOT dead - you're getting a response ONE day after you posted a message on a SUNDAY. Get real and please don't hijack threads. It is counter productive and more likely to delay responses.mokshal1663 wrote:Is this forum dead?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Junior Coder
- Posts: 33
- Joined: Sat Feb 27, 2010 8:11 pm
Re: Dead?
Sorry, I was just frustrated and couldn't think straight.mtettmar wrote:No, the forum is NOT dead - you're getting a response ONE day after you posted a message on a SUNDAY. Get real and please don't hijack threads. It is counter productive and more likely to delay responses.mokshal1663 wrote:Is this forum dead?
- Phil Pendlebury
- Automation Wizard
- Posts: 543
- Joined: Tue Jan 16, 2007 9:00 am
- Contact:
You may also find my Tolerance Tester useful:
http://www.mjtnet.com/forum/viewtopic.php?t=5913
I am just doing a little work on this right now to make it a bit more useful.
EDIT: Update is done.
http://www.mjtnet.com/forum/viewtopic.php?t=5913
I am just doing a little work on this right now to make it a bit more useful.
EDIT: Update is done.
Phil Pendlebury - Linktree