Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 339

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 392

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 394
autoIt工具实现操作浏览器自动选择文件上传的操作 - Joyber 的博客

在chrome浏览器中点击文件上传后,弹出文件选择窗口,再用autoIt脚本执行中(脚本打包成exe文件)

WinActivate('打开')
ControlSetText("打开", "", "Edit1", $CmdLineRaw)
Sleep(30)
ControlClick("打开", "",  "Button1")

以上脚本的意义:
激活标题为“打开”的窗口
设置Edit1输入框中的值为 命令行传入的参数
点击【打开】按钮

如果脚本编辑时中文乱码,变成问号了,是编码问题
解决方法:File→Encoding→UTF-8

具体脚本语法参考中文文档:
https://www.wenjiangs.com/doc/autoit-winactivate

标签: none

添加新评论