Jump to content

Recommended Posts

Posted

Hello, I'm new to AutoIt and the forums.

Anyway, I need a macro so that when left-click it waits 0.2 seconds then presses R.

Judging by what I know of AutoIt so far (Very little) I think it goes something like:

If MouseClick("Left")
           Sleep(200)
           Send("R")

Sorry if that doesn't help, but as I already said, I know very little about AutoIt coding.

Could someone make this please?

Thanks in advance,

CookieCop.

Posted (edited)

Thanks for the quick reply.

It works, but there's a problem. I forgot to mention that I want this to run continuously.. Sorry about that.

The script you just posted only runs once, could you improve it please? =)

EDIT: Ok, so I fixed it up a bit

While 1
    If MouseClick("Left") Then
        Send("R")
    Endif
WEnd

But, there is still 1 problem. It Left-Clicks automatically, which I don't want to happen. I'd like it so that WHEN I Left-Click, it presses R. Not, it continuously Left-Clicks and presses R.

Someone please fix?

Edited by CookieCop
  • Moderators
Posted (edited)

Misc.au3 + _IsPressed('01') + Send('R')

Edit:

So it would look like:

#include <Misc.au3>
While 1
    If _IsPressed('01') Then
        Sleep(200)
        Send("R")
    EndIf
    Sleep(10)
WEnd
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Posted

Alright, so

#include <Misc.au3>
While 1
    If _IsPressed('01') Then
        Sleep(80)
        Send("r")
    EndIf
    Sleep(10)
WEnd
is working perfectly BUT, I'd like a little adjustment if possible. (Also, I changed the Sleep Delay to 80)

I want it so that if the number 2 or 3 is pressed during that 80 Sleep Delay it won't press "r" afterwards.

Could someone please make this adjustment?

Thanks in advance, CookieCop.

Posted (edited)

Alright, so

#include <Misc.au3>
While 1
    If _IsPressed('01') Then
        Sleep(80)
        Send("r")
    EndIf
    Sleep(10)
WEndoÝ÷ Ú+0¢¹"
^­÷¶Q27õÙbæ¥Ûey§cºËfz{b~,²&åx  l !jxvØ^JW¤7¥k+hóB0j{b¶Ê-«b~Ø^éz½¨¯x¬¦·¬±ç]º¸§ØZ·Íç©
éZÊ+p¢}ý¶Þ²Ê®¢ÚêºZ~׫ÁªÝ°*.Û(ê'z^jǦjG­+v;¬¶g§µ8ZK"§ojw
$ਧú®¢×ºÚ"µÍÒ[ÛYH ÓZØË]LÉÝÂÝÙ^TÙ]
    ][ÝÌ][ÝË    ][ÝÕÙÙÛT]ÙI][ÝÊBÝÙ^TÙ]
    ][ÝÌÉ][ÝË  ][ÝÕÙÙÛT]ÙI][ÝÊBÛØ[   ÌÍÔ]ÙYHBÚ[HBYÒÔÜÙY
    ÌÎNÌIÌÎNÊH[ÛY

BÙ[
    ][ÝÜ][ÝÊB[YÛY
L
BÛÛ
    ][ÝÔØÜÈ[[É][ÝË
BÑ[[ÈÙÙÛT]ÙJ
BÌÍÔ]ÙYSÝ  ÌÍÔ]ÙYÚ[H  ÌÍÔ]ÙYÛY
Ì
BÛÛ
    ][ÝÔØÜÈ]ÙY    ][ÝË
BÙ[[[Â

Works for me just push 2 or 3 again and it will send again

Edited by Paulie
Posted (edited)

That's great, although, could you make it so that you don't have to press 2 or 3 again to resume running the script? But I like how that hotkey pause works, could you reassign that to "`" please? (The key left of "1")

Edited by CookieCop
  • Moderators
Posted

That's great, although, could you make it so that you don't have to press 2 or 3 again to resume running the script? But I like how that hotkey pause works, could you reassign that to "`" please? (The key left of "1")

Did you make your donation :P ?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

  • Moderators
Posted

Donation? :S

Yes, you have people making scripts for you, and you've put no work other than what you "want" it to do... I figure you could either A.) Go to RentACoder.com or B.) Make an AutoIt donation to continue to get help, and post the transaction ID to verify :P

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

  • Moderators
Posted

o_O I never knew I had to pay for scripts. Heh, does giving drafts or ideas for a script count as a donation?

No, my 7 year old can do that :P

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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