Jump to content

generator


Recommended Posts

Create a random number between your values, and then convert it to hex.

By default Hex numbers are 8 chars... just strip the leading 0 if your script doesn't handle it.

For $i=1 To 10
$hexnum = Random(Dec('1000000'),Dec('fffffff'),1)
ConsoleWrite(Hex($hexnum)&@CRLF)
Next

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Link to comment
Share on other sites

thank you :)

take a look to my previous code..

$q = Chr(Random(48 , 57)) & Chr(Random(65, 70))

$w = Chr(Random(48, 57)) & Chr(Random(65, 70))

$e = Chr(Random(48, 57)) & Chr(Random(65, 70))

$r = Chr(Random(48, 57)) & Chr(Random(65, 70))

$t = Chr(Random(48, 57)) & Chr(Random(65, 70))

$y = Chr(Random(48, 57)) & Chr(Random(65, 70))

$u = Chr(Random(48, 57)) & Chr(Random(65, 70))

$string = $q & $w & $e & $r & $t & $y & $u

Link to comment
Share on other sites

Well, everyone has to start somewhere. :)

I just need to convert from hex to dec and back fairly regularly so I'm very familiar with those functions.

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Link to comment
Share on other sites

By default Hex numbers are 8 chars... just strip the leading 0 if your script doesn't handle it.

Yes they are. can can use stringtrimleft() if needed.

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Link to comment
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
 Share

  • Recently Browsing   0 members

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