Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4438 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

This topic is 4438 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.