Jump to content

A Little Help For Someone New To Autoit


Guest CyberFett
 Share

Recommended Posts

Guest CyberFett

I am looking for a Autoit script that will click in one spot as fast as possible. For those who play SWG you will know what it is for. This is the script I am currently using. But I was wondering if there was any way to speed up the clicks.

WinActivate, SwgClient

Sleep, 0

Start:

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

LeftClick, 984, 93

IfWinNotActive, SwgClient, , Exit

Goto, Start

Any help would be appreciated.

Link to comment
Share on other sites

um, i too am new to the Wonderful World of AutoIt so i dont know what past versions offered but i think v2? used goto commands. i see them in your post so i assume you are still using v2 i would recomend downloading v3.

once you are updated, do a helpfile search on "MouseClick" you will find your anser there.

:cheer: awww...wheres the chick?

Link to comment
Share on other sites

Guest CyberFett

SetBatchLines,200

;or higher

I am using V3, checked the help file and LeftClick is the command to click the mouse and for Dbl Click you do it twice.

Larry: Like I said I am new to this. What does this mean and where do I put it in the script?

Link to comment
Share on other sites

Guest CyberFett

OK looked SetBatchLines up in help and I think I understand. This speeds up how many lines it executes per 10ms cycle time. It says the max value is 32767. I have a 3.2 gHz Processor with 2GB of Ram, how fast do you think I should go? And One more question. Where would I put this in the script?

Edited by CyberFett
Link to comment
Share on other sites

Guest CyberFett

You are using v2.  There isn't a "LeftClick", "Goto", or "SetBatchLines" in v3.  They have all been superceeded by superior methods.

Your right I downloaded the wrong one. Thanks

Anyone want to suggest a new script for this on V3? :whistle:

Link to comment
Share on other sites

MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

how about

AdlibEnable("pause"); adlib will keep the pause function running

HotKeySet("{Pause}","pauseset"); this toggles on and off with Pause key
$Pause = -1; I prefer to start it in Pause mode
sleep(100)

While 1
if winactive("SWG") then MouseClick ( "left" , 984, 93, 1000 ,0 ); click left mouse at 984, 93   1000 times each pass
sleep(1)
Wend

Func pauseset(); this toggles the value of $pause
  $Pause = $Pause * -1
EndFunc

Func pause(); this sleeps when $pause is -1 and doesn't when $pause =1
  While $Pause = -1
       Sleep(500)
  Wend
EndFunc

Not sure what the name on the window is for SWG, so I put SWG in. Warning, if you run this without the if winactive part, you may endup oppening a few thousand instances of a program or something before you can hit my pause function.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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