AutoHotkey Community

It is currently May 25th, 2012, 11:26 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: July 15th, 2007, 10:23 am 
Sorry if the topic title sounds vague.
Well, basically I want to remap a key to click the mouse at a specific coordinate, but whenever I hold down the remapped key AutoHotkey will make repeated mouse clicks instead of holding the mouse button down.

I looked at the help file and found SetMouseDelay which is supposed to solve my problem, but apparently it only works with the LButton command, and I can't assign a coordinate to LButton.

Here's an example of how my script looks like:
Code:
a::Click 44, 55
SetMouseDelay -1
return


AutoHotkey ignores SetMouseDelay completely.
I know this is a dumb problem, but I couldn't find anything at the help file.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 15th, 2007, 3:02 pm 
Offline

Joined: June 23rd, 2007, 12:23 pm
Posts: 87
Hi,
try to write it in this way:

Code:
a::
    SetMouseDelay -1
    Click 44, 55
return


If you want the setmousedelay to be applied to your click you should put it before. And I think that a command on the same line of the hotkey would be interpreted as a one-line subroutine e.g.:
Code:
a::Click 44, 55

a::
Click 44, 55
return

these are equivalent.

AutoHotKey Doc wrote:
In the final line above, "return" serves to finish the hotkey. However, if a hotkey needs to execute only a single line, that line can be listed to the right of the double-colon. In other words, the return is implicit:

#n::Run Notepad


Bye! :shock: :)


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, Google Feedfetcher and 66 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