A while back, I posted the script “FileVault-proof Finder selection to alias list” in the “Scriptbuilders” forum and received the question below on integrating it in Automator. My attempt at a reply is below, tough I’m sure it’s not the final word. Any better ideas, anyone?
Thx,
Jan
Hello,
I am a bit confused on how to use this
script. What i am trying to do is use
automator to grab a list of photos from
finder, then pass the list to preview to
scale the photos. Like yourself i run
filevault and get the dreaded -1728
error whenever i try the scripts. Do i
just put this after the get finder items
automator action in a run apple script action?
Thanks
marc
Essentially yes, tough you may have to play around with replacing the finderSelectionToAliasList() handler in the run block with f.i. the also included finderSelectionToPOsixPathList() handler, as I believe the Preview application prefers to accept a list of posix paths as input in Automator workflows.
In workflows that you call from within f.i. Automator, you don’t need the “get selected finder items” step at all, just put the run apple script action step discussed above in its place to avoid FileVault issues.
In case you plan to save the workflow as a Finder plugin, I believe that you might also not need the apple script step - in Finder plugins, Automator sometimes seems to treat selected FileVault items correctly, i.e. as a regular Finder items selection. In this case, just make sure not to insert a “get selected finder items” step at the start of your workflow: it appears that explicitly calling the Finder action will often ruin things again. (Used in a plugin, a FileVault-friendly version of the “get selected Finder items” action seems to be called automatically most of the time…)
Sorry for this “trial & error” reply, but I haven’t fully explored all the FileVault issues in Automator myself. In case you really get bogged down in Automator, perhaps you can fall back on Script Editor instead of Automator and script a regular AppleScript droplet - they also automatically bypass the Finder issues with selections of FileVault items. In this approach, you might prefer to use Image Events scripting to scale your pictures instead of calling the Preview application. Browse the “Scriptbuilders” and other forums here for other scripters’ approaches on automating/scripting repetitive image scaling.
HTH,
Jan
Model: Alu-PowerBook 15" 1.25 GHz
AppleScript: 1.10
Browser: Safari 412.2
Operating System: Mac OS X (10.4)