Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases
You last visited: Today at 11:05

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Random Text Udf

Discussion on Random Text Udf within the Coding Releases forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2013
Posts: 11
Received Thanks: 0
Random Text Udf

Nothing difficult... if ever need a password generator, a way to make temp file with out worry too much about files that already exists or what ever you can use this...

As usual, append to the end of file and call it
E.G.

;Creates the temp file for text operations
$TempFile = @TempDir & "\" & _RandomText(10) & ".tmp"
$TempFile = FileOpen($TempFile)
Code:
Func _RandomText($N)
 ;$n is the lenght of string.
   If $N < 1 Then Return -1
   Local $COUNTER, $ALPHA, $RESULT
   
   For $COUNTER = 1 To $N
      If Random() < 0.5 Then
         $ALPHA = Chr(Random(Asc("A"), Asc("Z") + 1))
      Else
         $ALPHA = Chr(Random(Asc("a"), Asc("z") + 1))
      EndIf
      $RESULT = $RESULT & $ALPHA
   Next
   Return $RESULT
EndFunc  ;==>_RandomText
Liented is offline  
Reply


Similar Threads Similar Threads
[SALE] Random ISRO chars in random servers CHEAP, from 1$ to 3$
06/03/2012 - Silkroad Online Trading - 4 Replies
Hello, I want to sell all those chars very cheap for PayPal money from 1$ to 3$ , because I need some money to buy usb joystick to play FIFA on pc ^^ If you buy them all, I can sell all those chars for 15$!!! Contacts - skype: myntex2 I ACCEPT PAYPAL ONLY So let's start:



All times are GMT +2. The time now is 11:06.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.