Saves the text in the Clipboard. vbs
The principle is to first determine whether there is a file with the same name, the existence of the name after +1, and then save the contents of the Clipboard to the custom extension file
Copy Code code as follows:
Set Fso=createobject ("Scripting.FileSystemObject"): name=1
Dim NA
Na=inputbox ("Please enter the extension name:", "Development name", "TXT")
While Fso.fileexists (name& ".") &na) =true
Name=name+1
Wend
Set O=fso.opentextfile (name& ".") &na,2,true)
Set Hf=createobject ("Htmlfile")
Wind=hf.parentwindow.clipboarddata.getdata ("text")
O.writeline Wind:o.close
Saves the text on the Clipboard and edits. vbs
Copy Code code as follows:
Set Fso=createobject ("Scripting.FileSystemObject"): name=1
Dim NA
Na=inputbox ("Please enter the extension name:", "Development name", "TXT")
While Fso.fileexists (name& ".") &na) =true
Name=name+1
Wend
Set O=fso.opentextfile (name& ".") &na,2,true)
Set Hf=createobject ("Htmlfile")
Wind=hf.parentwindow.clipboarddata.getdata ("text")
O.writeline Wind:o.close
CreateObject ("Wscript.Shell"). Exec "notepad.exe" &name& "." &na& ""