cmd和vbs程序.

(2020-2-6 20:30:55)

sound.vbs

dim operation
set operation=wscript.createobject("wscript.shell")
operation.run "cmd /k"
wscript.sleep 100
operation.sendkeys "echo  ^g{enter}"
' 中英文.需要按一次.
wscript.sleep 2000
operation.sendkeys "exit {enter}"
' 完成.(2020-2-6 20:29:56)

stopvbs.vbs

dim operation
set operation = wscript.createobject("wscript.shell")
operation.run "taskkill /im wscript.exe /f ",0 ,true

(2020-2-6 20:36:48)舊代碼.

auto_mysql

.vbs文件

dim operation
set operation = wscript.createobject("wscript.shell")
operation.run "%comspec% /k mysql -u root -p"
wscript.sleep 100
operation.sendkeys "改爲用戶密碼{enter}{enter}"
wscript.sleep 100
operation.sendkeys "show  databases{enter};{enter}"
wscript.sleep 300
operation.sendkeys "(five  seconds{enter}  to  input :)"

do until k>25
wscript.sleep 100
operation.sendkeys "{bs}"
k=k+1
loop
operation.sendkeys "use  "

wscript.sleep 5000
operation.sendkeys "{enter};{enter}show  tables ;{enter}"
operation.sendkeys "select  * from  "

(2020-2-6 20:59:47){enter涉及中英文切換}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章