老师我是这样您看对吗?#NoTrayIcon
BlockInput(1)
Opt("MouseCoordMode", 0)
Opt("TrayIconDebug", 1) ;右下角显示脚本暂停在哪一步,方便测试使用
Opt("TrayAutoPause", 0);托盘图标单击后不暂停
Opt("MouseCoordMode", 1)
Run(@ScriptDir & "\WinRar.exe")
$title1 = "WinRAR 4.01 简体中文版"
$title2 = "WinRAR 简体中文版安装"
$text_1 = "目录文件夹(&D)"
$text_2 = "WinRAR 关联文件"
$text_3 = "WinRAR 已经成功地安装到文件夹"
WinWaitActive($title1,"")
ControlSetText($title1,$text_1,"Edit1","D:\Program Files\WinRAR")
ControlClick($title1,$text_1,"[CLASS:Button; INSTANCE:2]")
WinWaitActive($title2,$text_2)
ControlClick($title2,$text_2,"[CLASS:Button; INSTANCE:27]")
WinWaitActive($title2,$text_3)
ControlClick($title2,$text_3,"[CLASS:Button; INSTANCE:1]")
WinClose("WinRAR")
BlockInput(0)
但是安装完成后弹出这个电脑窗口,如何用函数关闭,谢谢! |