首页 > 代码库 > 原创:Mac AppleScript 自动登录两个QQ

原创:Mac AppleScript 自动登录两个QQ

前提,已有登录过的账号,且没有设置为自动登录

 

<style>p.p1 { margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana; color: #0433ff } p.p2 { margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana; color: #0433ff } p.p3 { margin: 0.0px 0.0px 0.0px 83.2px; text-indent: -83.2px; font: 12.0px Verdana; color: #000000 } p.p4 { margin: 0.0px 0.0px 0.0px 124.8px; text-indent: -124.9px; font: 12.0px Verdana; color: #0433ff } p.p5 { margin: 0.0px 0.0px 0.0px 166.5px; text-indent: -166.5px; font: 12.0px Verdana; color: #0433ff } p.p6 { margin: 0.0px 0.0px 0.0px 166.5px; text-indent: -166.5px; font: 12.0px Verdana; color: #812fdc } p.p7 { margin: 0.0px 0.0px 0.0px 166.5px; text-indent: -166.5px; font: 12.0px Verdana; color: #000000 } p.p8 { margin: 0.0px 0.0px 0.0px 124.8px; text-indent: -124.9px; font: 12.0px Verdana; color: #000000 } p.p9 { margin: 0.0px 0.0px 0.0px 41.6px; text-indent: -41.6px; font: 12.0px Verdana; color: #000000 } span.s1 { color: #000000 } span.s2 { } span.s3 { color: #0433ff } span.s4 { color: #812fdc } span.Apple-tab-span { white-space: pre }</style>

tell application "QQ"

activate

tell application "System Events"

tell application process "QQ"

activate

set frontmost to true

key code {48, 51}

keystroke "QQ1号码"

delay 1

keystroke return

delay 1

keystroke "QQ1密码"

keystroke return

delay 1

delay 1

keystroke "n" using command down

delay 1

key code {48, 51}

keystroke "QQ2号码"

delay 1

keystroke return

delay 1

keystroke "QQ2密码"

delay 1

keystroke return

delay 1

end tell

end tell

end tell

 

原创:Mac AppleScript 自动登录两个QQ