Jump to content
Sign in to follow this  
go0b3r

Need a simple script, randomly press 1-10?

Recommended Posts

go0b3r

Hey, im trying to figure this out, can someone help me make a simple script that loops, i just need it to type 0-9 until i shut it off. I dont want it to go 1,2,3,4,5,6,7,8,9,0.. Id like it if it could be randomized?

Share this post


Link to post
Share on other sites
J0ker

Look at Random() in the helpfile. :)

While 1
$number = Random(0,10, 1)
MsgBox(0,"",$number)
Wend
Edited by J0ker

Share this post


Link to post
Share on other sites
go0b3r

Look at Random() in the helpfile. :)

While 1
$number = Random(0,10, 1)
MsgBox(0,"",$number)
Wend

How do i get it to pick 0-9 but not have a popup window, like if i open notepad while its on it should type 5,3,1,2,6,1,6,7,8,3, blah blah blah, with like a 4 second wait between number changes.

Share this post


Link to post
Share on other sites
narayanjr

While 1
$number = Random(0,10, 1)
Send($number)
sleep(4000)
Wend

that should do it i think

Edited by narayanjr

Share this post


Link to post
Share on other sites
Generator

Example of Random Keyboard input, this should give you the idea.

Note: Bad example of UBound

#include<Array.au3>
#include<Misc.au3>
Global $KeyStroke, $UBound, $Value, $Dll
$KeyStroke=_ArrayCreate("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U")
$UBound=UBound($KeyStroke,20)
HotKeySet( "{ESC}","Quitscript")
ToolTip( "Fun Begins"&@CRLF&"Press ESC to Exit",Default,Default,"Random KeyStroke",1,1)
Sleep(1500)
ToolTip("")
While 1
    $Dll=DllOpen("user32.dll")
    If _IsPressed($UBound, $Dllopen)Then
        RandomKeys()
    Else
        Sleep(1000)
    EndIf
WEnd

Func Quitscript()
    DllClose($Dll)
    Exit
EndFunc
Func RandomKeys()
    $Random=Random($UBound[0],$UBound[20],1)
    Send("$Random",1)
EndFunc

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  

×