【发布时间】:2016-05-02 03:37:49
【问题描述】:
在软件安装过程中,我一直试图将焦点集中在 Windows 上。窗口没有标题。脚本一直失败。有人可以让我知道我的脚本是否有什么可以更改的吗?
这应该可以点击确定按钮:
Sleep, 4000.
Send, {control down}
MouseClick, Left, 300, 185,
Send, {Control up}
结果是它会在 Windows 开始菜单旁边打开 Google Chrome,而不是单击桌面中间打开窗口上的确定位置。
我的完整脚本如下:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
;#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Sleep, 1000 ;language selection and next.
Send, {tab}
Sleep, 500
Send, {tab}
Sleep, 500
Send, {tab}
Sleep, 500
Sleep, 2000
Send, {Enter}
Sleep, 1000 ;directory and installation.
Send, {tab}
Sleep, 500
Send, {tab}
Sleep, 500
Send, {tab}
Sleep, 500
Send, {tab}
Sleep, 500
Send, {tab}
Sleep, 5000
Send, {Enter}
Sleep, 500
Send, {tab}
Sleep, 5000 ;for installation wait time.
Send, {Enter} ;finish.
Sleep, 7000
Run "myexecutable.exe"
Sleep, 4000 ;focus attempt 2.
Send, {control down}
MouseClick, Left, 300, 185,
Send, {Control up} ;for association OK.
【问题讨论】:
标签: focus autohotkey