Jump to content

random number at random interval? - (Locked)


Recommended Posts

Hi, I'm trying to write a script to type random  numbers from 1-5 with random delays in between. The script will end with my hotkey F1.

It's not working too well. Where did I go wrong? 

Thanks in advance

 


WinActivate("Notepad")

HotKeySet("{F1}", "StopTYPE")

Global $StopTYPE = False


 $random = Random(1, 5, 1)
$time = Random(1000, 3000, 1)

While 1
    

    Sleep($time)    
    Send("5")
    Sleep($time)    
    If $StopTYPE Then ExitLoop
WEnd
 

 

 

Link to comment
Share on other sites

  • Developers

What exactly isn't working? Your code is sending a 5 at random times. :)

...and open the helpfile on how hotkeyset  works.

So why exact do you need something like this anyways?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...