Sign in to follow this  
Followers 0
Sparrowlord

Simpe But I cant do it

5 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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


[center]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.[/center]

Share this post


Link to post
Share on other sites

yea......

Use Smoke's code, much better, and quite frankly more intelligent than mine. There's about 8% of his script that I don't even know what's going on, but I know its better....lol

Share this post


Link to post
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
Sign in to follow this  
Followers 0