【发布时间】:2015-11-28 04:24:58
【问题描述】:
我在使用这个脚本时遇到了一些问题:
If WinExists ("[CLASS:CabinetWClass]", "Address: C:\Users\Dad\Downloads") Then
WinActivate ("[CLASS:CabinetWClass]", "Address: C:\Users\Dad\Downloads")
Else
Run("Explorer.exe" & "C:\Users\Dad\Downloads")
Endif
如果我打开了 Downloads 的子目录,例如 C:\Users\Dad\Downloads\Pictures,它将聚焦该窗口而不是继续Else 语句。
如果没有打开 Windows 资源管理器窗口,系统只会对我发出哔哔声,然后脚本关闭。我在这里的答案中选择了我的代码:https://www.autoitscript.com/forum/topic/30600-open-folder-with-autoit/。
我尝试将此标记为 Run() 函数和 text 参数。
【问题讨论】:
-
如果“&”被移除,2.被解析。
-
由于某种原因,删除“&”也解决了 1。所以,我很好奇为什么。
标签: function text autoit targeting