AutoHotkey Community

It is currently May 27th, 2012, 10:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: imagesearch problem
PostPosted: January 19th, 2008, 9:58 am 
Offline

Joined: May 9th, 2007, 8:13 am
Posts: 45
hi,

i dont know,its probably a bug but the next code is not working:
Code:
hotkey,lbutton,1

1:
ImageSearch,x ,y , 380, 195, 400, 215, contc.bmp
sleep,75
if errorlevel=0
                     {
                       send,abcd
                       send,enter
                       return
                     }
send,{click down left}
sleep,15
send,{click up left}
return




the hotkey just does the left click even when the image is there,i tested the imagesearch command alone and works 100% of the times.


any ideas?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2008, 4:16 pm 
Offline

Joined: July 18th, 2006, 12:18 pm
Posts: 403
obviously its going to. use a if/else statement heres the code that will work

Code:
hotkey,lbutton,1

1:
ImageSearch,x ,y , 380, 195, 400, 215, contc.bmp
sleep,75
if errorlevel=0
    {
                       send,abcd
                       send,enter
                       return
    }
else if errorlevel = 1
{
send,{click down left}
sleep,15
}


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, chaosad, specter333 and 63 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group