[Autoit]how to code a macro like this?

01/23/2016 18:52 pouyanz#1
can any one please help me with coding this macro in autoit?

i want a series of keyboard and mouse buttons to be sent with like a 0.15-1 sec delays while holding down Rclick

and i want it to stop when i release the Rclick button, and i want it to start from the begining after i hold Rclick again

i know i can use "send" and "sleep" for the keys and the delay but dunno how to do the holding Rclick button thing



would really appreciate the help

thnx in advance
01/23/2016 19:30 Moneypulation#2
[Only registered and activated users can see links. Click Here To Register...]
01/23/2016 19:54 pouyanz#3
Quote:
Originally Posted by Moneypulation View Post
[Only registered and activated users can see links. Click Here To Register...]
so is this good?

or this?

01/23/2016 20:35 alpines#4
Holy shit that code looks disgusting. Do you even kno what you're doing?
01/23/2016 21:16 pouyanz#5
Quote:
Originally Posted by alpines View Post
Holy shit that code looks disgusting. Do you even kno what you're doing?
no
but im trying :)
01/26/2016 00:23 mlukac89#6
Maybe like this ?

Code:

#include <Misc.au3>

Global $hDLL = DllOpen("user32.dll"), $time = 500
Global $keys[8] = ["a", "b", "c", "d", "1", "2", "3", "4"]


While 1

    If _IsPressed("02", $hDLL) Then
        
        While _IsPressed("02", $hDLL)
            For $i = 0 To UBound($keys) -1
                Send($keys[$i])
                Sleep($time)
            Next
        WEnd

    EndIf
    Sleep(250)

WEnd

DllClose($hDLL)
01/26/2016 15:16 pouyanz#7
Quote:
Originally Posted by mlukac89 View Post
Maybe like this ?

Code:

#include <Misc.au3>

Global $hDLL = DllOpen("user32.dll"), $time = 500
Global $keys[8] = ["a", "b", "c", "d", "1", "2", "3", "4"]


While 1

    If _IsPressed("02", $hDLL) Then
        
        While _IsPressed("02", $hDLL)
            For $i = 0 To UBound($keys) -1
                Send($keys[$i])
                Sleep($time)
            Next
        WEnd

    EndIf
    Sleep(250)

WEnd

DllClose($hDLL)

wow, THANK YOU !!!!!