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 

Auto Right Click?

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



Joined: 07 Aug 2009
Posts: 1

PostPosted: Fri Aug 07, 2009 10:34 am    Post subject: Auto Right Click? Reply with quote

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.
Back to top
View user's profile Send private message
lilalurl.T32



Joined: 17 May 2007
Posts: 391
Location: Titan

PostPosted: Fri Aug 07, 2009 11:50 am    Post subject: Re: Auto Right Click? Reply with quote

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 Sun Mar 13, 2011 6:44 am; edited 1 time in total
Back to top
View user's profile Send private message
SpiderGames



Joined: 09 Jun 2008
Posts: 936
Location: Canada

PostPosted: Sat Aug 08, 2009 12:21 pm    Post subject: Reply with quote

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.
_________________

I know i have 6 legs. It's cuz I'm special.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
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