AutoHotkey Community

It is currently May 26th, 2012, 8:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: August 14th, 2009, 1:37 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 2:02 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 2:47 am 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
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

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 5:08 am 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
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..

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 5:14 am 
Offline

Joined: July 29th, 2009, 10:47 pm
Posts: 48
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 :shock:

_________________
Click here to get free games and computer supplies! It's easy and fun! CLICK ME!

EasyAHK


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 12:17 pm 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
Thats strange, works here :?:

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 8:18 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 8:31 pm 
Really wierd... now the mouse scripts wont even load up anymore but all my other scripts load fine.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 8:36 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 14th, 2009, 9:54 pm 
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.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Pulover, SKAN, StepO and 58 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