title: AppleScript to open all files in a folder, one by one. Alias list to carry filename for pasting later?
body: <p>I have hundreds of custom FileMaker Pro .fp7 files that I need to Open, menu item "Export Script..." for and save. Here's what I have so far.</p>
  
  <pre><code>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
  </code></pre>
  
  <p>My challenge is this: FileMaker Pro wont carry the filename into the Export name window. It only says Untitled.tab. Is there a way to either source and copy the filename as it's being opened or alias'd? Either hold it in the clipboard to paste later...or, have the repeat function pause for me to type each .tab filename.</p>
  
  <p>Thanks,
  G.</p>