Jump to content

Simpe But I cant do it


Recommended Posts

I have spent the last 2 hours trying to figure this out. So if anyone could help me I would like friggin love you to death because this is very very important. I need something that clicks in the same spot for 5 minutes then clicks in another spot for 5 minutes and keeps doing that until I end it.

Thanks,

Lord

Link to comment
Share on other sites

I have spent the last 2 hours trying to figure this out. So if anyone could help me I would like friggin love you to death because this is very very important. I need something that clicks in the same spot for 5 minutes then clicks in another spot for 5 minutes and keeps doing that until I end it.

Thanks,

Lord

HI,

have a look at MouseClick ( "button" [, x, y [, clicks [, speed ]]] )

Create a while loop. A func with coordinates as parameters. That's it.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I have spent the last 2 hours trying to figure this out. So if anyone could help me I would like friggin love you to death because this is very very important. I need something that clicks in the same spot for 5 minutes then clicks in another spot for 5 minutes and keeps doing that until I end it.

Thanks,

Lord

For example: this should work for you. Even though I am sure there must be better ways to write it.

$time_between_clicks = 5000; 5 seconds

$forever = 0
While $forever < 10000

$i = 0 ;While loop counter
While $i < 60 ;for 5 minutes
MouseClick ("left", 500, 500, 1); left-click mouse 1 time at coordinates 500, 500
Sleep ($time_between_clicks)
$i += 1
WEnd

$i2 = 0 ;While loop counter
While $i2 < 60 ;for 5 minutes
MouseClick ("left", 600, 600, 1); left-click mouse 1 time at coordinates 600, 600
Sleep ($time_between_clicks)
$i2 += 1
WEnd

WEnd
Link to comment
Share on other sites

  • Moderators

Here's another approach:

HotKeySet('{ESC}', '_EndClicks')

Global $CoordSetX[2] = [500, 600], $CoordSetY[2] = [600,600], $LoopCount = 0
$Timer = TimerInit()
While 1
    While ((TimerDiff($Timer) / 1000) / 60) < 5
        MouseClick('Primary', $CoordSetX[$LoopCount], $CoordSetY[$LoopCount], 1, 1)
        Sleep(10)
    WEnd
    If Not $LoopCount Then 
        $LoopCount = 1
    Else
        $LoopCount = 0
    EndIf
    $Timer = TimerInit()
WEnd

Func _EndClicks()
    Exit 0
EndFunc
Nees Beta...

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.

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...