This topic created in 4507 days ago, the information mentioned may be changed or developed.
自从新买的mac到了以后,最近都在熟悉mac os x ,发现applescript 很强大。于是网上看了一些例子,写了一个自动登录qq的脚本,但是发现输入密码的时候 按键输入到了错误的窗口中。
请大家看看什么问题
tell application "QQ"
activate
tell application "System Events"
tell application process "QQ"
keystroke "password"
keystroke return
end tell
end tell
end tell
1 replies • 1970-01-01 08:00:00 +08:00
 |
|
1
ri0day Jan 6, 2014 1
解决了:一定要把QQ这个应用设置到frontmost ,也就是focus到当前的app 窗口上
tell application "QQ" to activate tell application "System Events" to set frontmost of process "QQ" to true tell application "System Events" keystroke "password" keystroke return end tell
|