求一段自动输入用户,密码,登录的脚本~
发表于 : 2016-08-03 11:08

代码: 全选
#!/bin/bash
/opt/Citrix/ICAClient/selfservice --icaroot /opt/Citrix/ICAClient &
sleep 2
id=$(xwininfo -name "Citrix Receiver" | grep "id:" | awk '{print $4}')
xdotool windowactivate $id
xdotool key u s e r n a m e
xdotool key Tab
xdotool key p a s s w o r d
xdotool key Tab
xdotool key d o m a i n
代码: 全选
xdotool key --window $id --clearmodifiers --delay 1 u s e r n a m e
代码: 全选
xdotool type --window $id --clearmodifiers --delay 1 "username"