If Merlin won't go to the mountain…
Since the Launch as Root plugin action doesn't work as expected, I came up
with this applescript action to open an application's binary and a some
file as root.
If anyone knows how to make the 3rd pane optional, please let me know.
*using terms from* *application* "Quıcĸsıɩⅴεʀ"
*on* *open files* direct_objects with indirect_objects
*set* theAppPath *to* (POSIX path *of* direct_objects)
*set* theFilePath *to* (POSIX path *of* indirect_objects)
*set* theCFBundleExec *to* (*do shell script* "defaults read '" & theAppPath
& "Contents/Info.plist' CFBundleExecutable")
*set* theCommand *to* ("sudo -b " & theAppPath & "Contents/MacOS/" &
theCFBundleExec & " && sleep .5 && open -a " & theAppPath & space &
theFilePath)
*display dialog* "Please verify that the following command is correct." default
answer theCommand buttons {"Cancel", "Run"} cancel button "Cancel" default
button "Run"
*do shell script* theCommand *with* administrator privileges
*end* *open files*
*on* *get argument count*
*return* 2
*end* *get argument count*
*on* *get direct types*
*return* {"NSFilenamesPboardType", "NSStringPboardType"}
--return {"com.apple.application-bundle"} -- UTI doesn't work, see tracker
*end* *get direct types*
*on* *get indirect types*
*return* {"NSFilenamesPboardType", "NSStringPboardType"}
*end* *get indirect types*
*end* *using terms from*
--
You received this message because you are subscribed to the Google Groups
"Quicksilver" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/d/optout.