Jump to content
Server Maintenance This Week. ×

use the value from a field in a scriptstep


z178

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

Recommended Posts

Am trying to use the filepath of a file stored in a field (Not the POSIX Path) to open the file using applescript.

I have the following script steps

Set Variable [$FilePath; Value: DocumentLibrary::File Path]

How can I use this variable $FilePath in a "Perform Applescript" Script step?

Link to comment
Share on other sites

You just need to massage the path into an applescript and use the variable's value as text for the calculated script, not the dafault option, but the one above!

Substitute( and Replace( comes in pretty handy here!

--sd

Link to comment
Share on other sites

If the code were

tell app "Finder"

open $filepath

end tell

How should I have "Stringified" the above script.

In otherwords how do I add the return keys at the end of each line. Use the inverted P character?

Link to comment
Share on other sites

Just use the carriage return symbol, ¶ (Option-7 on Mac), just like any other FileMaker calculation.

"tell app "Finder"¶open ("" & $FilePath &"") as alias¶end tell"

Edited by Guest
Link to comment
Share on other sites

This topic is 6065 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.