AppleScript 使用结束键和向上箭头
AppleScript using end key and up arrow
我正在尝试创建一个苹果脚本,用于将数据从名为 Panorama 的应用程序复制并粘贴到 Excel 2011 for Mac。除了让 excel 移动到相邻列并移动到第一个记录位置(键盘快捷键是 "end" 键和向上箭头。我不确定如何让 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
结束重复
tell application "System Events" to key code 119 -- End key
tell application "System Events" to key code 124 -- right arrow
我正在尝试创建一个苹果脚本,用于将数据从名为 Panorama 的应用程序复制并粘贴到 Excel 2011 for Mac。除了让 excel 移动到相邻列并移动到第一个记录位置(键盘快捷键是 "end" 键和向上箭头。我不确定如何让 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
结束重复
tell application "System Events" to key code 119 -- End key
tell application "System Events" to key code 124 -- right arrow