Jump to content

how can i code this macro?


pouyanz
 Share

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...