I would like to pass the created file based on Stationery to a script via ‘do shell’. Is this possible? In the present case it is more of a convenience thing, but other times it could be very useful. Two problems: ‘context’ seems to not contain the basename entered via the dialog, and where if possible do I execute the script?
Also, I would like to be able to run scripts over the files created via Shift-F1, but could not find way to intercept those via AppleScript. Is there a way?
on metadata(_context) global _recordPath set _libraryPath to libraryPath of _context set _recordBaseName to "theFile" -- get basename entered in dialog. set _libraryPath to replaceString(_libraryPath, "EagleFilerLibrary.eflibrary", "") set _recordPath to _libraryPath & folderName of _context & "/" & _recordBaseName & ".rtf" -- pass the created file to a script somehow and somewhere. -- do shell script "/usr/bin/perl /opt/local/bin/eaglefiler_set_swedish.pl " & _recordPath end metadata