AutoHotkey Community

It is currently May 27th, 2012, 1:00 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: January 27th, 2012, 2:56 am 
Well thank you very kindly berban_.
Your reply has cleared the air for me considerably. I now have a better sense of how to effectively use your very tidy script.


Report this post
Top
  
Reply with quote  
PostPosted: April 17th, 2012, 2:35 am 
Hello. Thank you for this useful script!

I am trying to use the k-parameter, but I am a little bit confused reading the documentation.
I am trying to find a image and have the left button of the mouse down(pressing the image)

I tried using

Code:
FindClick("image.png","a x-20 k {LButton Down}")


But with no success.
Help me please!
Thank you


Report this post
Top
  
Reply with quote  
PostPosted: April 18th, 2012, 4:33 pm 
Offline

Joined: March 16th, 2011, 6:12 pm
Posts: 172
Location: Worcester, Massachusetts
Aply: No space between k and the value for k

Also since the value contains a space you'll need quotes

Code:
FindClick("image.png","a x-20 k""{LButton Down}""")

You need to double the quotes since it is in an expression.

Alternatively you could do this:

Code:
Options = a x-20 k"{LButton Down}" ;traditional declaration means the text is literal
FindClick("image.png", Options)

I know it's not the most intuitive thing in the world, sorry about that :?

Also if you're going to be holding down the key you'll probably want to release it after a while.

Code:
If FindClick("image.png","a x-20 k""{LButton Down}""") { ;if the image is found & the click occurs
   Sleep 1000 ;sleep for a bit
   Send {LButton Up} ;and then release the key
}

_________________
★★★ Email me at berban at aim full stop com ★★★


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bon, sks and 20 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