I am new to VBscript, i want a code that can delete any random word and then replace it with the same character I deleted,!! Here is the code,
Dim SearchString, SearchChar
Dim intLength, MyPos
' Open file containing Search String and store it in variable used by all functions
'
Set objFSO = CreateObject("Scripting.
Set objFile1 = objFSO.OpenTextFile("D:\Google Search String.txt",1)
SearchString =objFile1.ReadLine
'
WScript.Sleep 4000
' Create Shell Object used for typing command by all functions
'
Set WshShell = WScript.CreateObject("WScript.
'Call random function
TypeConstantSpeed(SearchString
Function TypeConstantSpeed(
For MyPos = 1 To Len(strSearchString)
SearchChar = Mid(strSearchString,MyPos,1)
Function Rand(min,max)
max=4
min=1
Randomize
Rand =(Int((max-min+1)*Rand+min))
End Function
'WScript.Echo SearchChar
WshShell.SendKeys SearchChar
WScript.Sleep 500
Next
WshShell.SendKeys "{ENTER}"
End Function
1. I know first i have to calculate the length of a string, and use random function and then write backspace code and then retype the deleted value, !I know the logic but i am finding it difficult to execute,!! If any help isgiven it will be appreciated!! Please Help! Thank you.