September 29, 201213 yr Newbies Hi, Ive been building a script that inserts a picture into a container field, that has its location specified by a calculated text field, this works sequentially. This works quite well. However as the script works through the 40K records in the database I would like to run an Applescript that changes the label of the files as they are imported, to see if there are any that have not been incorporated, (or otherwise mark them). The bit that works OK so far is: Fo to Field [select/perform; Macintosh_HDOld Converted::picref] Set Variable [$File_Name; Value:Macintosh_HDOld Converted::picref] Go to Field [Macintosh_HDOld Converted::Pic] Insert Picture [Reference; "$File_Name"] Go to Record/Page[Next] Perform Applescript ["tell application "Finder"…………… Perform Script ["New INSERT PIC"] The bit I'm having problems with is: "tell application "Finder"¶ set label index of "" & to 2 Let( [ path = GetField ( Macintosh_HD_Old Converted::picloc ) ; pathTrim = Replace ( path ; 1 ; 1 ; "" ) ; pathMac = Substitute ( pathTrim ; "/" ; ":" ) ; result = pathMac & Macintosh_HD_Old Converted::picloc ] ; result ) & ""¶end tell" I basically copied the second half from a script that would tell the finder to delete the file, and tried to modify it for my own uses. Thanks, Patrick
Create an account or sign in to comment