Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

I have a container field which contains a file reference, and another field that displays the path to that external file. I'd like to make a script (button) which simply reveals the original external file in the OS X Finder. A calculated Applescript may be the answer but I have no idea as to syntax. Suggestions??

Once you have a Mac syntax file path (which you can calculate if needed), then it's fairly simple. You have to get the quotes and returns right in the calculation. If the Mac path is in a field called "Filepath":

"tell application "Finder"¶

reveal file "" & Filepath & ""¶

activate¶

end tell"

A Mac path looks like: "Macintosh HD:Users:fej:Documents:some file.txt"

I imagine there's a Unix command for this also, but I can't remember offhand; I always use the above.

Maybe the Unix command would be to just open the folder, which works. But the above also scrolls to and highlights the file, which is a nice touch.

Edited by Guest

  • Author
  • Newbies

That's great. Thank you very much. But I'm really struggling to turn a FM path into an HFS path. I found a custom function online called FilePathToHFS but I can't get it to work and it doesn't seem to deal with the fact that FM gives you BOTH windoze and mac filepaths.

So any suggestions as to a formula or algorithm that can convert FM paths to HFS paths?

http://www.satimage.fr/software/en/file_paths.html

http://www.briandunning.com/cf/743

--sd

I worked out some calculations for this. They are kind of long, so I'm just going to upload an example file, which I built for displaying images via a calculation, no matter which platform inserted them. It may not work in all situations, but the calculations are in there.

The _cOS_FilePath is the relevant one. But it depends on 2 others, for the Drive and the Volume name.

RemoteImage_MacPC_calc.fp7.zip

  • Author
  • Newbies

Thanks Fenton!!!

That file will be invaluable.

In the meantime I came up with this formula to translate FM paths into Applescript-friendly paths:

Substitute ( Right ( Location_path ; (Length ( Location_path )-(Position ( Location_path ;"filemac" ; 1 ; 1 )+8) )) ; "/" ; ":" )

It finds the string "filemac" and deletes it and everything before it, then substitutes colons for slashes. Fancy huh?

At least it works...for my mac users anyway...

Many thanks again.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.