| View previous topic :: View next topic |
| Author |
Message |
JJ03 Guest
|
Posted: Fri Aug 14, 2009 12:37 am Post subject: Hold click = mouse moves down |
|
|
What script can I use to make the following possible...
Hold the left mouse button down for about 0.5 seconds and then have the mouse start to move down at a medium - fast speed and stop moving down once I let go of the left mouse button. |
|
| Back to top |
|
 |
Z_Gecko Guest
|
Posted: Fri Aug 14, 2009 1:02 am Post subject: |
|
|
| Code: | ~LButton::
sleep 500
if GetKeyState("LButton")
{
loop
{
if !GetKeyState("LButton")
break
MouseMove, 0, 2 , 0, R ; adjust the "2" to your needs
sleep 20 ; adjust to your needs
}
}
return |
|
|
| Back to top |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
Posted: Fri Aug 14, 2009 1:47 am Post subject: |
|
|
I also did one but think the above is better..
| Code: | SetTimer, watchMouseClick, 1
watchMouseClick:
MouseGetPos, mPosX,mPosY
count++
GetKeyState, mState, LButton, D
if mState = D
{
; ToolTip, %count%
if count > 100 ; Increase to 500 for .5 sec hold.
{
SetTimer, watchMouseClick, Off
Gosub, moveMouseDown
}
}
Else
count =
Return
moveMouseDown:
Loop,
{
mPosY++
MouseMove, %mPosX%, %mPosY%, 5,
GetKeyState, mState, LButton, D
if mState = U
Break
}
SetTimer, watchMouseClick, 1 ; To exit after 1st click and move delete this line!
Return
esc::Exitapp |
Press escape to exit or delete to bottom SetTimer.
I could not figure out how not to select everything while the mouse is moving. Probably something simple.
anyway hth _________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞ |
|
| Back to top |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
Posted: Fri Aug 14, 2009 4:08 am Post subject: |
|
|
A little mod on Z_Gecko's version that stops the mouse from downclicking while it moves.
| Code: | LButton::
sleep 500
if GetKeyState("LButton", "P")
{
Loop
{
if !GetKeyState("LButton", "P")
Break
MouseMove, 0, 2 , 0, R ; adjust the "2" to your needs
Sleep 20 ; adjust to your needs
}
}
Return
esc::Exitapp |
Again escape exits the hotkey.. _________________
paradigm.shift:=(•_•)┌П┐RTFM||^.*∞ |
|
| Back to top |
|
 |
TchnclFl
Joined: 29 Jul 2009 Posts: 48
|
Posted: Fri Aug 14, 2009 4:14 am Post subject: |
|
|
| TLM wrote: | A little mod on Z_Gecko's version that stops the mouse from downclicking while it moves.
| Code: | LButton::
sleep 500
if GetKeyState("LButton", "P")
{
Loop
{
if !GetKeyState("LButton", "P")
Break
MouseMove, 0, 2 , 0, R ; adjust the "2" to your needs
Sleep 20 ; adjust to your needs
}
}
Return
esc::Exitapp |
Again escape exits the hotkey.. |
Lol I find it impossible to click with this version  _________________ Click here to get free games and computer supplies! It's easy and fun! CLICK ME!
EasyAHK |
|
| Back to top |
|
 |
TLM
Joined: 21 Aug 2006 Posts: 2926 Location: The Shell
|
|
| Back to top |
|
 |
JJ03 Guest
|
Posted: Fri Aug 14, 2009 7:18 pm Post subject: |
|
|
Hmmm. All three of these don't work for me.
I loaded Z_geckos script and tried TLM's mod to it and both do not allow me to left click at all.
TLM's second script which is different than Z_geckos allows me to click but it doesn't do anything. I hold the mouse down for 10 seconds and nothing happens. |
|
| Back to top |
|
 |
JJ03 Guest
|
Posted: Fri Aug 14, 2009 7:31 pm Post subject: |
|
|
| Really wierd... now the mouse scripts wont even load up anymore but all my other scripts load fine. |
|
| Back to top |
|
 |
JJ03 Guest
|
Posted: Fri Aug 14, 2009 7:36 pm Post subject: |
|
|
Ok ignore the first two posts. TLM's second script works fine now. I just need to know how to make it move down at a faster speed.
Thanks for the help. |
|
| Back to top |
|
 |
JJ03 Guest
|
Posted: Fri Aug 14, 2009 8:54 pm Post subject: |
|
|
Everything works the way it should now. My AHK must of been having issues because edited and reloaded scripts were not applying the changes I had made while some scripts would load and others would not. Restarted my computer and all of these scripts work as described now.
Thanks. |
|
| Back to top |
|
 |
|