AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

imagesearch problem

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
dandy



Joined: 09 May 2007
Posts: 45

PostPosted: Sat Jan 19, 2008 8:58 am    Post subject: imagesearch problem Reply with quote

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?
Back to top
View user's profile Send private message
i3egohan



Joined: 18 Jul 2006
Posts: 319

PostPosted: Sat Jan 19, 2008 3:16 pm    Post subject: Reply with quote

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
}

_________________
`Autohotkey User`
- I3egohan
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group