0
我正在尝试创建一个苹果脚本,将数据从名为Panorama的应用程序复制并粘贴到Mac版Excel 2011中。除了在Excel中移动到相邻列并移动到第一个记录位置(键盘快捷键是“结束”键和向上箭头,我不知道如何得到AppleScript的认识与向上箭头组合结束键如果有人能告诉我怎么做这样做,将不胜感激的说还是另辟蹊径AppleScript使用结束键和向上箭头
这是到目前为止我的代码:。
重复2次
repeat 2 times
tell application "Panorama" to activate
tell application "System Events"
tell process "Panorama"
keystroke "c" using command down
tell application "System Events" to keystroke (ASCII character 31)
end tell
end tell
delay 0.8
tell application "Microsoft Excel" to activate
tell application "System Events"
tell process "Microsoft Excel"
keystroke "v" using command down
tell application "System Events" to keystroke (ASCII character 31)
end tell
end tell
delay 0.8
end repeat
tell application "Panorama" to activate
tell application "System Events"
tell process "Panorama"
tell application "System Events" to keystroke (ASCII character 29)
tell application "System Events" to key code 115
end tell
end tell
delay 0.8
tell application "Microsoft Excel" to activate
tell application "System Events"
tell process "Microsoft Excel"
tell application "System Events" to keystroke (ASCII character 29)
tell application "System Events" to keystroke End using up arrow <----(This is the part not working.)
end tell
end tell
delay 0.8
端重复
我厌倦了你什么建议,现在我得到的是说,一个错误: – MRCromer
对不起我打过早进入,错误说预期线,但发现号结束。任何想法可能意味着什么? – MRCromer
我想通了。我没有“关键代码”的空间。我把它写成“keycode”。这工作。谢谢。 – MRCromer