walkerwzy
2016-02-16 11:45:15 +08:00
写一 个 alfred 的 workflow: chat 朋友名 呼出
on alfred_script(q)
tell application "System Events"
set isQQRunning to exists (processes where name is "QQ")
end tell
if not isQQRunning then
tell application "QQ" to launch
delay 0.5
end if
tell application "QQ" to activate --- activates QQ
tell application "System Events"
tell process "QQ" --- implying QQ is already activated
key code 3 using {command down} --- send cmd+F to Sparrow invoking search
keystroke q --- enter the query
end tell
end tell
end alfred_script