pouyanz

how can i code this macro?

6 posts in this topic

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

Share this post


Link to post
Share on other sites



what application is this for?

Share this post


Link to post
Share on other sites

Hmm this topic will probably end like this one ...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Just now, mikell said:

Hmm this topic will probably end like this one ...

well this one wont break any rules though

Just now, kaisies said:

what application is this for?

im just learning how to code 

Edited by pouyanz

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

ok just to confirm

is this what im looking for?

https://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm

 

is this it ?

Spoiler

 

While 1
        
        While _IsPressed("02")
           Send{a}
            Sleep(250)
           Send{w}
            Sleep(250)
           Send{s}
            Sleep(250)
           Send{d}
            Sleep(250)
           Send{1}
            Sleep(250)
           Send{2}
            Sleep(250)
           Send{3}
            Sleep(250)
        WEnd
      
WEnd

 

 

or this?

While 1

        If _IsPressed("02") Then

           Send{a}
            Sleep(250)
           Send{w}
            Sleep(250)
           Send{s}
            Sleep(250)
           Send{d}
            Sleep(250)
           Send{1}
            Sleep(250)
           Send{2}
            Sleep(250)
           Send{3}
            Sleep(250)


        While _IsPressed("02")
         Sleep(250)
        WEnd
      
WEnd

 

Edited by pouyanz

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Strike 2,  This is your last chance to read those forum rules, specifically the part not to open a new thread similar to the closed thread.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.