Jump to content
Sign in to follow this  
lolp1

Random () help

Recommended Posts

lolp1

EDIT:

I figrued out one problem, but here is the other:

When I try this code:

Global $Paused 
HotKeySet("{END}", "TogglePause") 
HotKeySet("{HOME}", "Terminate") 
 
While 1 
    Sleep(1) 
 WEnd 
  
Func TogglePause() 
$Paused = NOT $Paused 
While $Paused 
    $RandomNumber= Random ( 100,2000,1)
sleep($RandomNumber)
MouseClick("left") 
WEnd 
EndFunc 
 
Func Terminate() 
   Exit 0 
EndFunc

It does not loop or pause, just closes after 1 click.

How ever when I try it with out the random func, it loops and pauses fine.

Edited by lolp1

Share this post


Link to post
Share on other sites
PaulIA

You don't know how to use Random, that's what's wrong:

sleep(& Random(100, 500, 1000) )oÝ÷ Ù«­¢+ÙM±À¡I¹½´ ÄÀÀ°ÔÀÀ°Ä¤¤

Makes the script sleep for 100 to 500 milliseconds


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites
lolp1

Read my new post (edited) and learn to be respectfull on a forum.

Share this post


Link to post
Share on other sites
PaulIA

Read my new post (edited) and learn to be respectfull on a forum.

First, you changed your post to cover up for your stupidity. Second, I'm probably one of the more respectful people around here. Most of the people here would have told you to RTFM. Third, if you're going to insult me, you need to learn how to spell first.

Auto3Lib: A library of over 1200 functions for AutoIt

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.