我做了一个简单的AppleScript,从Photoshop复制图层名称并将它们粘贴到Illustrator中。它在山狮中工作正常,但现在在优胜美地无法正常工作。它重复了 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
感谢您的任何帮助!
tell application "System Events" to repeat 6 times
tell process "Photoshop" to repeat until frontmost is true
set frontmost to true
delay 1
end repeat
keystroke "/" using command down
keystroke "c" using command down
keystroke tab
tell process "Illustrator" to repeat until frontmost is true
set frontmost to true
delay 1
end repeat
keystroke "v" using command down
keystroke return
keystroke "-"
keystroke space
end repeat