复制/粘贴文本的Apple脚本在Yosemite中被破坏

时间:2015-04-28 18:57:09

标签: macos applescript automator yosemite

我制作了一个简单的AppleScript,它从Photoshop复制图层名称并将它们粘贴到Illustrator中。它在Mountain Lion中运行良好,但现在它在Yosemite中无法正常工作。它重复了6次,但似乎没有在第一次运行时激活Illustrator。它确实激活了Illustrator,其他5次重复。这是:

repeat 6 times
tell application "Adobe Photoshop CC 2014" to activate
tell application "System Events"
    tell process "Photoshop"
        keystroke "/" using command down
        keystroke "c" using command down
        keystroke tab
    end tell
end tell
delay 0.3
tell application "Adobe Illustrator" to activate
tell application "System Events"
    tell process "Illustrator"
        keystroke "v" using command down
        keystroke return
        keystroke "-"
        keystroke space
    end tell
end tell
end repeat
end

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

{{1}}