Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Hold click = mouse moves down


  • Please log in to reply
9 replies to this topic
JJ03
  • Guests
  • Last active:
  • Joined: --
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.

Z_Gecko
  • Guests
  • Last active:
  • Joined: --
~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


TLM
  • Administrators
  • 3864 posts
  • Last active:
  • Joined: 21 Aug 2006
I also did one but think the above is better..

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

Posted Image

don't duplicate, iterate!


TLM
  • Administrators
  • 3864 posts
  • Last active:
  • Joined: 21 Aug 2006
A little mod on Z_Gecko's version that stops the mouse from downclicking while it moves.

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

Posted Image

don't duplicate, iterate!


TchnclFl
  • Members
  • 48 posts
  • Last active: Oct 11 2009 09:08 PM
  • Joined: 29 Jul 2009

A little mod on Z_Gecko's version that stops the mouse from downclicking while it moves.

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 :shock:

TLM
  • Administrators
  • 3864 posts
  • Last active:
  • Joined: 21 Aug 2006
Thats strange, works here :?:

Posted Image

don't duplicate, iterate!


JJ03
  • Guests
  • Last active:
  • Joined: --
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.

JJ03
  • Guests
  • Last active:
  • Joined: --
Really wierd... now the mouse scripts wont even load up anymore but all my other scripts load fine.

JJ03
  • Guests
  • Last active:
  • Joined: --
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.

JJ03
  • Guests
  • Last active:
  • Joined: --
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.