Automatically send information vbs

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Automatically send information vbs


记住不要坑人,否则变成猪头不怪我
复制

Sub SetClipboardText(Text)
Set objIE = CreateObject(“InternetExplorer.Application”)
objIE.Navigate(“about:blank”)
objIE.Document.ParentWindow.ClipboardData.SetData “text”, Text
objIE.Quit
End Sub
Sub SetClipboardTextA(Text)
Dim Word
Set Word = CreateObject(“Word.Application”)
Word.Documents.Add
Word.Selection.Text = Text
Word.Selection.Copy
Word.Quit False
End Sub
i=1
c=test
set wshshell=createobject(“wscript.shell”)
c=inputbox(“发送内容”,“in”,“test”)
SetClipboardTextA©
wscript.Sleep 1000
do while i<=100
wshshell.sendkeys “^V”
WshShell.SendKeys i
WshShell.SendKeys “{enter}”
wscript.Sleep 50
i=i+1
loop



Copy the code in the following code sheet

Sub SetClipboardText(Text)
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate("about:blank")
objIE.Document.ParentWindow.ClipboardData.SetData "text", Text
objIE.Quit
End Sub
Sub SetClipboardTextA(Text)
Dim Word
Set Word = CreateObject("Word.Application")
Word.Documents.Add
Word.Selection.Text = Text
Word.Selection.Copy
Word.Quit False
End Sub
i=1
c=test
set wshshell=createobject("wscript.shell")
c=inputbox("发送内容","in","test")
SetClipboardTextA(c)
wscript.Sleep 1000
do while i<=100
wshshell.sendkeys "^V"
WshShell.SendKeys i
WshShell.SendKeys "{enter}"
wscript.Sleep 50
i=i+1
loop 

Guess you like

Origin blog.csdn.net/yuanwow/article/details/93340837