公司採用的oa辦公系統每次開機都要登入感覺挺麻煩的,於是想著寫乙個批處理去實現自動登入
一般oa登入都是使用者名稱、密碼然後登入,所以實現的思路就是先開啟**,傳送tab、使用者名稱,enter等訊息
start iexplore
@echo off
>t.vbs echo set ws=createobject("wscript.shell")
>>t.vbs echo ws.sendkeys ""
>>t.vbs echo wscript.sleep 1000
>>t.vbs echo ws.sendkeys ""
t.vbs
del t.vbs
上面只是模板,我的使用者名稱和密碼瀏覽器都是記著的所以就不用輸了,需要輸入的話也很簡單
傳送數值和字母模擬按鍵就直接輸入之母和數值就行了 比如你要傳送 ab12就是這ws.sendkeys "ab12"
傳送模擬按鍵時候
shift 用 +
ctrl 用 ^
alt 用 %
其他模擬按鍵
鍵 引數
退格鍵 、 或
break
caps lock
del 或 delete 或
向下鍵
end
enter 或 ~
esc
help
home
ins 或 insert 或
向左鍵
num lock
page down
page up
print screen
向右鍵
scroll lock
tab
向上鍵
f1
f2
f3
f4
f5
f6
f7
f8
f9
f10
f11
f12
f13
f14
f15
f16
在上邊的模板靈活變通就行了~_~
自動登入指令碼
為了解決不同網路空間的問題,本來是想通過改變環境變數的方式,不過最終還是 選擇了在shell指令碼下,選擇了網路空間後執行指令碼。同時這個庫,還可以實現相應的檔案傳輸功能,這也是比較划算的乙個功能。usr bin python coding utf 8 auther vchao 16.12.16 i...
sqlplus dbtool自動登入指令碼
shell中呼叫sqlplus sqlplus s user pwd datebasespool b.txt select from a spool off exit eofcat b.txt tr d b.txt shell中呼叫dbtool dxyyt kefu dbtool cxtyd rw ...
ssh自動登入指令碼
使用vpn,每次都要在terminal上重複輸入命令 ssh d port user host 出來密碼提示符後,把複雜的密碼拷貝下來,然後貼上到terminal,敲回車.終於忍受不了這樣的重複了,於是用shell寫乙個可以自動登入的指令碼 usr bin expect f set port por...