Jump to content

Recommended Posts

Posted

Ok so basically i need to make a program to replace "thistexthere" automatically with like random letters or numbers this script is java script and has to be edited and excuted in the browser bar

java script:('thistexthere','enter')

so basically replacing thistexthere with random letters and number and then pressing enter would excute the script

any question ask here.

Posted

Hi,

Dim $NewVal,$NewTextValue

$TextToReplace="thistexthere"

$FileContent=FileRead("ScriptFileNameAndPath") ; This read the content of the file and put it into a variant ($Filecontent)

For $i=1 to StringLen($TextToReplace) ; Will loop until all patterns in string will be handled

$NewVal=Random(0,1000) ; Generate the random number between 0 and 1000

$NewTextValue=$NewVal & StringTrimLeft($TextToReplace,$i) ; Replace the pattern by the $Newval and adds the rest of the string

Next

$FileContent=StringReplace($FileContent,$TextToReplace,$NewTextValue) ; Replace the text to replace by the new value each time it's found in the file...

I hope this will work... I tested it and it's ok for me.

FreeRiderHonour & Fidelity

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
×
×
  • Create New...