Daniel Paquin Posted January 25, 2011 Posted January 25, 2011 How can I get from the Calculation function the value found in DestinationFolder ? tell application "Finder" set DestinationFolder to (path to home folder as text) end tell Thanks!
Daniel Paquin Posted January 25, 2011 Author Posted January 25, 2011 How can I get from the Calculation function the value found in DestinationFolder ? tell application "Finder" set DestinationFolder to (path to home folder as text) end tell Thanks! Well I found that I can use something like Get (DesktopPath). I will see what else I can do with my calculation function. I had the idea to remove the word "Desktop". However, this will not work on a French OS.
Fenton Posted January 25, 2011 Posted January 25, 2011 I kind of wonder why you'd need this. As you've shown above, you can get the path easily with AppleScript; and you'd usually use such a Mac path via AppleScript; where you can easily get it (circular logic). But, for calculation fun, this is a FileMaker to produce exactly the same text. A bit of a PITA, because you need to remove the first "/" in the entire path, then remove "/Desktop/" (which I guess you could just hardcode, but where's the fun in that). Let ( [ DT_orig = Get (DesktopPath); len = Length (DT_orig); DT = Right (DT_orig; len - 1); pos = Position ( DT; "/"; len; -2); fm = Left ( DT; pos -1) ]; Substitute ( fm; "/"; ":") )
Daniel Paquin Posted January 25, 2011 Author Posted January 25, 2011 Thank you very much Fenton. I am trying to do most of my function using FileMaker Calculation. The reason I've needed this functionality is because the working folder I've created for my solution are under MacIntosh HD/User/Username/SubFolder1/SubFolder2. I needed a way to quickly retrieve the MacIntosh HD/User/Username path. I have a field which, using the calculation you've provided me with to populate the image reference. Using this function I can now add the proper path. It is now working, thanks again! Daniel
Recommended Posts
This topic is 5109 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 accountSign in
Already have an account? Sign in here.
Sign In Now