jokke Posted March 27, 2007 Share Posted March 27, 2007 Hiya, well i have a problem like topics says. Im trying to do a random without repeating any number again. For $x = 0 To 254 $random = Random(0,255,1) ConsoleWrite($random&',') Next I know this should be possible, i just cant remember what this is called. Scramble? UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
BrettF Posted March 27, 2007 Share Posted March 27, 2007 Hiya, well i have a problem like topics says. Im trying to do a random without repeating any number again. For $x = 0 To 254 $random = Random(0,255,1) ConsoleWrite($random&',') Next I know this should be possible, i just cant remember what this is called. Scramble? Maybe store the values into an var and then check if the number is in the var. If it is then do the random again and repeat the process. Im not sure on that though. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
jokke Posted March 27, 2007 Author Share Posted March 27, 2007 Well i made it into a array... not so nice code but it works well =)) #include <Array.au3> Dim $table[12],$num = -1 For $i = 0 To 11 $num +=1 $table[$i] = $num Next For $i = 0 To 11 $random = Random(0,11,1) $tableold = $table[$i] $tablenew = $table[$random] $table[$random] = $tableold $table[$i] = $tablenew Next _ArrayDisplay($table,'') UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now