April 4, 200916 yr Newbies I am trying to create a script that does the following 1) copies a serial number contained in a field in a FMP table 2) opens spotlight, pastes the copied serial number and searches for that serial number (which is the name of a pdf file 3) opens the top hit in spotlight which will be the pdf file I assume I need to use either Applescript or Automator to get this done. I have played around with it with no luck. Any help would be appreciated. Thanks.
April 4, 200916 yr Why not just store a ref to the pdf in the respective FM record and open it from there?
April 4, 200916 yr Author Newbies I thought of that, but I have over 5000 pdf's that I would need to insert into a container field. I thought using spotlight to find the pdf might be less work. I got a script working that finds a specific file. It is tell application "Finder" set the search_string to "46280" end tell tell application "System Events" keystroke " " using {option down, command down} delay 1 keystroke search_string delay 1 end tell What I want to do is instead of searching for "46280" I want to paste the contents of the clipboard into spotlight.
April 4, 200916 yr Oh, so this is catching up after the PDFs exist and they are scattered all over? Because if they're in one folder and named with a field value, then calc'ing the path and setting the reference is fairly straightforward. I'm not an AppleScripter, so I'll leave this to someone else.
April 4, 200916 yr If they're in one folder and named consistently, then calculating the path is all it takes. No need for "setting the reference" or an Applescript.
April 4, 200916 yr Author Newbies How would I set up the ref that you are referring to? I have all the files in about 20 different folders but I can easily put them all together. Thanks for the help.
Create an account or sign in to comment