wxhelper-docker/install-wechat.sh

59 lines
1.2 KiB
Bash
Raw Permalink Normal View History

2023-10-27 14:08:35 +08:00
#!/usr/bin/env bash
2024-02-23 14:11:46 +08:00
# 启动窗口管理器
bash -c 'nohup /entrypoint.sh 2>&1 &'
sleep 10
sudo netstat -ntlp
2023-10-27 14:08:35 +08:00
## https://gitlab.com/cunidev/gestures/-/wikis/xdotool-list-of-key-codes
function install() {
while :
do
xdotool search '微信安装向导'
NOTFOUND=$?
echo $NOTFOUND
if [ "$NOTFOUND" == "0" ]; then
2024-02-23 13:28:18 +08:00
echo "微信安装包已打开,等待安装"
2023-10-27 14:08:35 +08:00
sleep 80
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key space
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Return
sleep 16
xdotool key Tab
sleep 0.5
xdotool key Tab
sleep 0.5
xdotool key Return
break
fi
sleep 5
done
}
2024-02-23 13:54:32 +08:00
id
2024-02-23 13:57:40 +08:00
wine 'C:\WeChatSetup.exe' &
sudo ps -ef
2024-02-23 13:54:32 +08:00
2024-02-23 13:22:56 +08:00
sleep 1m
2023-10-27 14:08:35 +08:00
install
wait
sleep 10