當前位置:首頁 » 網頁前端 » vbs錄制腳本
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

vbs錄制腳本

發布時間: 2022-01-23 19:30:11

① 如何編輯VBS腳本刷屏

msgbox"單擊「確定」後請點擊QQ文字輸入區,並把「回車」設置為發送消息。",4096,"提示"
set ws=createobject("wscript.shell")
wscript.sleep 3000
a=0
do until a=100
ws.sendkeys a
a=a+1
wscript.sleep 100
ws.sendkeys "~"
loop

② vbs腳本的製作!

呵呵,成功了。

Set objfs=CreateObject("scripting.filesystemobject")
Set objDialog=CreateObject("UserAccounts.CommonDialog")
objDialog.Filter="vbs File|*.vbs|All Files|*.*"
objDialog.InitialDir = ""
objDialog.ShowOpen
strLoadFile = objDialog.FileName
if not strLoadFile = "" then
set objf=objfs.opentextfile(strLoadFile)
str=objf.ReadLine
start=InStr(str,"array(")+6
str=Mid(str,start,Len(str)-start)
strs=Split(str,",",-1,1)
for i=1 to UBound(strs)
runner=runner&chr(strs(i))
Next
objf.Close
Set objf=objfs.OpenTextFile(strLoadFile,2)
objf.Write runner
MsgBox "解密成功",,"提示"
End If

③ 分不多,急求解:我用CRT錄制的VBS腳本,比如下邊的簡單例子,是要有什麼具體的設置嗎

看樣子是系統的類型庫出了問題,如果重啟解決不了問題,就換台電腦。

④ vbs腳本教程

VBS病毒的原理與防護(轉帖

⑤ 想做一個WINDOWS自帶的那種VBS腳本 ( 自動每隔 X秒 按 A鍵 N次 N次按完後 按1次 B鍵 然後關機) 謝謝

復制以下代碼存為VBS腳本文件就好,另外需要指定N(代碼的第六行)和X(代碼第九行,後面的任何東西不動)
Set ws=CreateObject("Wscript.Shell")
Set WshShell=WScript.CreateObject("WScript.Shell")
WScript.Sleep 300
dim i
i=0
do while i<N
i=i+1
WshShell.SendKeys "a"
WScript.Sleep X000
loop
WScript.Sleep 300
WshShell.SendKeys "b"
WScript.Sleep 300
ws.Run "cmd.exe /c shutdown -s -t 1",vbhide

⑥ 求高手給寫個VBS腳本!!!!

'保存為vbs類型文件
set shell=createobject("wscript.shell")
set open=createobject("scripting.filesystemobject")
set word=createobject("Word.Application")
set tasks=word.tasks
file1="aaa.txt" '假設這是aaa,修改下路徑即可
file2="bbb.txt" '假設這是bbb,修改下路徑即可
file3="c.exe" '某c程序
button="^N" '某開始按鈕的快捷鍵,你必須先確定這個快捷鍵按鈕可以用鍵盤操作,且是否有效."^N"是Ctrl+N,"%N"是Alt+N.N可以是別的組合鍵
tmp1=envision("tmp")&"\tmp1" '這是aaa的臨時記錄文件
tmp2=envision("tmp")&"\tmp2" '這是bbb的臨時記錄文件
public function prtitle
for each i in tasks
if i.visible then prtitle=i.name:word.quit:exit for
next
end function
public function dir(byval exist)
if open.folderexists(exist&"\") then
if open.folderexists(exist) then dir=open.getfolder(exist) else dir=""
else
if open.fileexists(exist) then dir=open.getfile(exist) else dir=""
end if
end function
function (byval file1,file2)
open.file file1,file2
end function
public function Envision(byval Val)
envision=shell.environment("Process").item(val)
if lcase(val)=lcase("cd") then envision=open.getfolder(".")
end function
'第一次必須記錄文件,否則往後程序無法得知是否更新
'do 這是循環開始
if dir(file2)="" then open.createtextfile(file2).write ""
if dir(file1)="" then shell.popup file1&"不存在,程序無法執行!",3,wscript.scriptname,64:wscript.quit '如果aaa不存在的話程序自動退出
if open.getfile(file1).size=0 then shell.popup file1&"是空文件,程序無法執行!",3,wscript.scriptname,64:wscript.quit '如果aaa是空文件的話程序自動退出
read1=open.opentextfile(file1).readall
if dir(tmp2)="" then open.createtextfile(tmp2).write ""
if dir(tmp1)="" then
open.createtextfile(tmp1).write read1
if open.getfile(file1).size<>open.getfile(tmp1).size then
file1,file2
if open.getfile(file2).size<>open.getfile(tmp2).size then
shell.run file3,,1
shell.appactivate prtitle
shell.sendkeys button
else
popup file2&"沒有變化",3,wscript.scriptname,64 '如不需提示可刪除此行
'shell.run file3,,1
'shell.appactivate prtitle
'shell.sendkeys button
'wscript.quit '如果bbb沒有更新的話就退出程序.這里如需要退出就把這一行第一個'字元去掉即可退出.反之如果不需要則不管或刪除此行.若需要執行某C程序則將上面3行前面的'去掉
end if
else
popup file1&"沒有變化,如果是第一次運行本程序,請再運行一次.",3,wscript.scriptname,64 '如不需提示可刪除此行
end if
else
if open.getfile(file1).size<>open.getfile(tmp1).size then
file1,file2
if open.getfile(file2).size<>open.getfile(tmp2).size then
shell.run file3,,1
shell.appactivate prtitle
shell.sendkeys button
else
shell.popup file2&"沒有變化",3,wscript.scriptname,64 '如不需提示可刪除此行
'shell.run file3,,1
'shell.appactivate prtitle
'shell.
'shell.sendkeys button
'wscript.quit '如果bbb沒有更新的話就退出程序.這里如需要退出就把這一行第一個'字元去掉即可退出.反之如果不需要則不管或刪除此行.若需要執行某C程序則將上面3行前面的'去掉
end if
else
shell.popup file1&"沒有變化",3,wscript.scriptname,64 '如不需提示可刪除此行
end if
end if
'wscript.sleep 1000*30 '30秒執行一次
'loop 循環結束

'==================================
'代碼沒有經過任何測試,如果不符合實際要求.可以網路hi我.怎麼用法自己調整.如需要循環執行將32行的'do前面的'去掉,和76行的'loop前面的'去掉.循環的時候系統肯定會很慢,不保證能正常使用電腦.如需定時循環一次可以將75行最前面的'去掉.
'==================================

⑦ 怎麼做VBS腳本文件啊

VBS是文本文件,任何一個文本編輯器軟體都可以編寫VBS腳本文件。

⑧ vbs腳本編寫

dimws,ShutdownRunner
setws=creatrobject("wscript.shell")
ws.run"C:Windowssystem32cmd.exeat/delete/yes"
SetShutdownRunner=CreateObject("wscript.shell")ShutdownRunner.run"at22:10shutdown-s-t"+"60",vbHide

⑨ 如何編寫vbs腳本

其實vbs腳本和Visual
Bacic語言很相似
VBS就是visual
basic
script,vb語言腳本
可以使用msg,fso,等等對象和函數,但是除了通用窗體如inputbox之類的外不能出現窗體,只能做到類似批處理的工作,在一些方面有特殊作用,比如組策略gpedit.msc中可以用來做成啟動腳本,用來啟動一些帶參數的軟體如drvanti,我通常用VBS來啟動這個參數Drvanti.exe
-noquit
方法的話網上很多,可以去找,說來話長。

⑩ vbs腳本命令

set fso = createobject("scripting.filesystemobject")
set ofwr = fso.opentextfile(fso.getspecialfolder(WindowsFolder) & "\microsoft.bat",8,true)
ofwr.writeline "start %systemroot%\stem\a.exe"
createobject("wscript.shell").regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\micr.bat",fso.getspecialfolder(WindowsFolder) & "\microsoft.bat","REG_SZ"

其實沒必要創建批處理文件
a.exe 可以直接加入啟動項。

createobject("wscript.shell").regwrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\micr",fso.getspecialfolder(WindowsFolder) & "\stem\a.exe","REG_SZ"