C-Command Software Forum

Open record in EagleFiler with Record Link

Hi,

how can a open a record in EagleFiler from AppleScript using the unique record Link?

Thanks

Something like this:

tell application "EagleFiler"
    get url "x-eaglefiler://open?library=..."
end tell

There may also be a more direct way to do what you want without using record links…

Thanks for the reply.

Sorry, I was meaning to use Applescript to open the actual file (in the relevant application, e.g. Skim or Safari) that is represented by a given EagleFiler record link

Is that possible?

OK, here’s one way to do that:

tell application "EagleFiler"
    set _url to "x-eaglefiler://open?library=..."
    tell library document 1
        repeat with _record in library records
            if _record's URL is _url then
                set _file to _record's file
                tell application "Finder" to open _file
            end if
        end repeat
    end tell
end tell

Thanks for your reply, much appreciated.

This code does work, but given that it’s searching every item’s record link and comparing to the desired one, it’s taking forever in my library (3000 items)

There may be a better way, but I really have no idea how this fits into what you’re trying to do. One option would be to use the first script (which is fast) to open a new window and select the record. Then you could simply get the file of the selected record and tell the Finder to open it.