How to use input assistant with vbs

Time:2020-10-23

//Drag the script to echo onto this script… Follow the prompts

Copy codeThe code is as follows:
On Error Resume Next 
Set Arg=Wscript.arguments 
If Arg.count=0 then Wscript.quit 
‘——————- 
‘Enjoy it 
‘Code By NetPatch 
‘——————- 
Fname = InputBox (“please enter the path to echo):”, “enter the file name”, “% systemroot% / system32/ webdl.vbs ”)  

Set Fso=CreateObject(”Scripting.FileSystemObject”) 
Set WshShell=Wscript.CreateObject(”Wscript.Shell”) 
Set File=Fso.OpenTextFile(Arg(0),1,False,-2)  

Wscript.echo “Start 5 seconds after point OK”
WshShell.AppActivate Command prompt
Wscript.Sleep 5000 
WshShell.AppActivate Command prompt

Do While File.AtEndOfStream <> True 
Data=File.readline 
If Data=”” then Data=”.” 
Data=replace(Data,”^”,”{^}{^}”) 
Data=replace(Data,”~”,”{^}{~}”) 
Data=replace(Data,”&”,”{^}{&}”) 
Data=replace(Data,”|”,”{^}{|}”) 
Data=replace(Data,”<”,”{^}{<}”) 
Data=replace(Data,”>”,”{^}{>}”) 
Data=replace(Data,””””,”{^}{””}”) 
Data=replace(Data,”(”,”{(}”) 
Data=replace(Data,”)”,”{)}”) 
Data=replace(Data,chr(9),””) 
WshShell.SendKeys “echo “&Data&”>>”&fname 
Wscript.Sleep 300 
WshShell.SendKeys “{ENTER}” 
Wscript.Sleep 1000 
Loop 
File.close 
Set Fso=nothing 

Recommended Today

Kafka learning materials

Kafka 1、 Benefits of message middleware 1. Decoupling It allows you to extend or modify processes on both sides independently, as long as you make sure they comply with the same interface constraints. It would be a great waste to put resources on standby to handle such peak visits. The use of message queue can […]