Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Please Help for a script


  • Please log in to reply
2 replies to this topic
phoretis
  • Members
  • 3 posts
  • Last active:
  • Joined: 08 Oct 2012

Hi everyone,

 

I'm a newbie with AHK and i need a script that can :

 

I want a toggle-able key, that does the following:

While i press left click press right click every 2 second for 300 ms release and repeat

 

Hope someone can help



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

http://www.autohotke...utofire-thread/



SkrillexAkaCraft
  • Members
  • 45 posts
  • Last active: Jan 04 2018 06:02 PM
  • Joined: 04 Feb 2015

well :)

 

 

this should be easy you just use this ^LBUTTON::           ;This is CTRL + Left mause button to start the script then for the RBUTTON you use this

 

send {RBUTTON DOWN}

sleep 100

send {RBUTTON UP}

 

 

its easier to make a library to make functions in it

 

 

Like this open a new project and call it Lib.ahk then start the lines with this

;Inlude List
;send the Right button up and down
 
 
;##############################
 
; Function:                         send_right_mausebutton()
; Description:                          Sends the right mause button up and down
;
 
 send_right_mausebutton(){
{
send {RBUTTON DOWN}
sleep 100
send {RBUTTON UP}
}

if you did that start writing your script and on the part where you want the mause button to be clicked you type  send_right_mausebutton()

 

oh and at the first line of your written script there should be #Include Lib.ahk depends if you do write the lib directly into the script yes/no

 

hope this helps :)