| View previous topic :: View next topic |
| Author |
Message |
StrangeOne
Joined: 07 Aug 2009 Posts: 1
|
Posted: Fri Aug 07, 2009 10:34 am Post subject: Auto Right Click? |
|
|
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 |
|
 |
lilalurl.T32
Joined: 17 May 2007 Posts: 391 Location: Titan
|
Posted: Fri Aug 07, 2009 11:50 am Post subject: Re: Auto Right Click? |
|
|
| 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 |
|
 |
SpiderGames
Joined: 09 Jun 2008 Posts: 936 Location: Canada
|
Posted: Sat Aug 08, 2009 12:21 pm Post subject: |
|
|
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 |
|
 |
|