Jump to content
Sign in to follow this  
myths224

help with random numbers not changing

Recommended Posts

myths224

hello been doing a small script to click at random points. when i first start it they are all random, but when the script loops the randoms dont change. just moves mouse within those cords and clicks, but never changes where it clicks  from the first . Ive been looking to a while and have see 1 topic on here with same issue but their code was alot more advanced and was clueless.

$first = 1
HotKeySet("=", "Start")
HotKeySet("-", "Terminate")

$posxa = random(411,500)
$posya = random(72,85)

Func Start()
    While $first = 1
        Sleep(5000)
        mousemove($posxa,$posya)
        Sleep(Random(100,350))
        MouseDown("left")           
        sleep(Random(50,150))
        MouseUp("left")
        WEnd
EndFunc

Share this post


Link to post
Share on other sites
singbass

I think you need to move these inside your while loop after your Sleep(5000) command.

$posxa = random(411,500)
$posya = random(72,85)

Share this post


Link to post
Share on other sites
myths224

I think you need to move these inside your while loop after your Sleep(5000) command.

$posxa = random(411,500)

$posya = random(72,85)

thanks i will try that

 

yes that did it, all the youtube vids i saw had them like i had them in first post, cant believe it was something so simple :) thanks alot. working great now.

Edited by myths224

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  

×