AutoHotkey Community

It is currently May 26th, 2012, 9:31 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Auto Right Click?
PostPosted: August 7th, 2009, 11:34 am 
Offline

Joined: August 7th, 2009, 11:24 am
Posts: 1
after searching for awhile, i found a suitable script that works great for me on auto click on left click when holding down. but how do i do the same for a right click? this is the script i used for left click:
Code:
*$LButton::
Loop
{
    if not GetKeyState("LButton", "P")
        break
    Click
    Sleep, 180   
}
return


i need a delay of 180 and no interruptions of the clicks when holding shift or alt. hopefully this makes sense, as i'm totally new to this. any help is greatly appreciated.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Auto Right Click?
PostPosted: August 7th, 2009, 12:50 pm 
Offline

Joined: May 17th, 2007, 6:03 pm
Posts: 391
Location: Titan
StrangeOne wrote:
after searching for awhile, i found a suitable script that works great for me on auto click on left click when holding down. but how do i do the same for a right click?


Replace each instance of LButton by RButton and Click by Click right?

Since you say you are new, have a look at Key list and Click in the help file (and the other commands too if you want to have a better understanding of how the script works).
________
Friend advice forums


Last edited by lilalurl.T32 on March 13th, 2011, 7:44 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 8th, 2009, 1:21 pm 
Offline

Joined: June 9th, 2008, 2:32 am
Posts: 936
Location: Canada
Well. When working with a comand and you want to change the parimaters and you dont know how. Look the command up in the AHK help file.

If Left click is "LButton" What could possibly be "RButton"?

Code:
*$LButton:: ; When the user and only the user presses Left Click, It will block the input and will trigger regardless if other keys are pressed.
Loop ; Begins a loop that will continue to restart over and over again unless the command "Break" is given.
{  ; Start of loop
    if not GetKeyState("LButton", "P") ; If LeftCLick isn't pressed Then...
        break  ; ...Stop
    Click  ; Otherwise send left click
    Sleep, 180    ; Pause for .18 of a second.
} ; start loop again.
return ; This line means stop.  This command can do other thing but i wont get into that.  It signals the end of a subrout


FYI: $ Befor a hot key means only the user can trigger the subrout instead of the script triggering it. * means any key may be held down with the LBUtton.

_________________
Image
I know i have 6 legs. It's cuz I'm special.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, JSLover and 60 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