Jump to content
Sign in to follow this  
VizjerianExile

Simple script request from a noob

Recommended Posts

Im looking for a basic scripting program that will simulate the Right click of a mouse every 1-2 mins random. It needs to just be 1 click, then wait 1-2 mins, and repeat. It doesnt need to be in any specific position, just where ever the curser is put by me and i know Nothing of autoit scripting, im relativly new at it. thank you for the help!

Share this post


Link to post
Share on other sites

Im looking for a basic scripting program that will simulate the Right click of a mouse every 1-2 mins random. It needs to just be 1 click, then wait 1-2 mins, and repeat. It doesnt need to be in any specific position, just where ever the curser is put by me and i know Nothing of autoit scripting, im relativly new at it. thank you for the help!

this should do the work:

While True
    $timestamp = TimerInit()
    $time = random(60, 120, 1) * 1000
    While TimerDiff($timestamp) < $time
        sleep(1000)
    WEnd
    MouseClick("right")
WEnd
Edited by tmo

Share this post


Link to post
Share on other sites

this should do the work:

While True
    $timestamp = TimerInit()
    $time = random(60, 120, 1) * 1000
    While TimerDiff($timestamp) < $time
        sleep(1000)
    WEnd
    MouseClick("right")
WEnd
I entered the script in, compiled it, and tried to run it and got this error:

Line 13 (file *script location*):

While True

While ^ ERROR

Error: Unknown function name.

--I believe im using the most updated version of autoit. Thankx!

Richard

Share this post


Link to post
Share on other sites

--I believe im using the most updated version of autoit.

i belive you are not :P

as boolean support (true and false) were added only a few versions ago (actually 3.2.0)

Share this post


Link to post
Share on other sites

just use While 1 instead of True. Should do the trick.


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

dont keep it to simple :P

You are right... we don't want to show all of the newbies how easy it can be. We could work ourselves right out of this high paying position. :-)

Hmmm, I could have one main script launch a child script to keep track of the time and STDIO the main script when it is time to click; then the main script launches a second child to do the actual click. :-)


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Hmmm, I could have one main script launch a child script to keep track of the time and STDIO the main script when it is time to click; then the main script launches a second child to do the actual click. :-)

LMFAO :P


- Dan [Website]

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...