Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

How can I delete a letter in a string and retype the same letter which was deleted in the text file! Please Help,

$
0
0

Here's my code, I want to delete any letter That I wrote and retype the same letter again, which was deleted, With the below code which I wrote, It is just typing the words that I wrote in the google search string!! I am new to VBScript , Thankyou, If any help is given that would be appreciated, Please Help!! Can you help me out with the exact code, Please, please Help!! Thank You!!

Dim SearchString, SearchChar

Dim intLength, MyPos

' Open file containing Search String and store it in variable used by all functions
'
Set objFSO = CreateObject("Scripting.FileSystemObject")
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.Shell")

'Call random functions

TypeConstantSpeed(SearchString)


'TypeConstantSpeed(strSearchString) types entire string with gap of 500 ms between characters, ending with enter

Function TypeConstantSpeed(strSearchString)

For MyPos = 1 To Len(strSearchString)

            SearchChar = Mid(strSearchString,MyPos,1)
            'WScript.Echo SearchChar
            WshShell.SendKeys SearchChar
            WScript.Sleep 2000

Next

WshShell.SendKeys "{ENTER}"

End Function

          

Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>