How to get the file from a bookmark file in ApplescriptObjC

Something for Shane …

I have a file with data of an alias file.
How I make that data? I place a alias file into a container of filemaker and export it and then it loses it alias type.
Now I want to be able to read the content of that file as a bookmark…

set theAliasPath to POSIX path of mItem -- "/Users/myUser/path/to/alias"
set theURL to current application's NSURL's fileURLWithPath:theAliasPath
set theBookmark to current application's NSURL's bookmarkDataWithContentsOfURL:theURL |error|:(specifier)

But then I’m lost in translation :slight_smile:
Can you help met to extract the file location of that data?

current application's NSURL's URLByResolvingBookmarkData:mBookmark options:0 relativeToURL:theURL bookmarkDataIsStale:false |error|:(specifier)

is not doing waht to expect…

Thnx

Once you have the bookmark data, you can get the path like this:

set theResult to (current application's NSURL's resourceValuesForKeys:{current application's NSURLPathKey} fromBookmarkData:theBookmark) -- returns a dictionary
set thePath to theResult's valueForKey:(current application's NSURLPathKey)

Thank you again Shane!…