我有数百个自定义 FileMaker Pro .fp7 文件需要打开,菜单项“导出脚本...”并保存。这是我到目前为止所拥有的。
tell application "Finder"
set fl to files of folder POSIX file "/Users/EDITOR/Desktop/DROP/" as alias list
end tell
repeat with f in fl
tell application "FileMaker Pro"open f
activate
end tell
tell application "System Events"
tell process "FileMaker Pro"
click menu item "Export Script..." of menu "File" of menu bar item "File" of menu bar 1 of application process "FileMaker Pro" of application "System Events"
delay 0.4
keystroke "/Users/EDITOR/Desktop/DROP/"
end tell
end tell
end repeat
我的挑战是:FileMaker Pro 不会将文件名带入导出名称窗口。它只显示 Untitled.tab。有没有办法在文件名被打开或别名时获取和复制文件名?要么将其保存在剪贴板中以便稍后粘贴……要么让我暂停重复功能以键入每个 .tab 文件名。
谢谢,G。