You don't have permission to save the file “Test.plist”.To view or change permissions, select the item in the Finder and choose File > Get Info.
--
You received this message because you are subscribed to the Google Groups "Quicksilver" group.
To post to this group, send email to blacktree-...@googlegroups.com.
To unsubscribe from this group, send email to blacktree-quicks...@googlegroups.com.
Visit this group at http://groups.google.com/group/blacktree-quicksilver?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Perhaps the execute line just needs the -b flag adding to it.
Feel free to take a look at the plugin and if you manage to fix it either let us know or open a pull request :)
By testing other actions I found that if I run sudo -b /Applications/ACP/PlistEdit.app/Contents/MacOS/PlistEdit with Run Command in Shell, authenticate, quit the app, wait 5' and run it again, QS still keeps the password stored as it appears already typed in the authentication field, see attachment.
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
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 runBinaryOnly to ("sudo -b " & theAppPath & "Contents/MacOS/" & theCFBundleExec)
set openFile to (runBinaryOnly & " && sleep .5 && open -a " & theAppPath & space & theFilePath)
display dialog "Please verify that the following command is correct." default answer openFile buttons {"Cancel", "Run Binary Only", "Open File"} default button "Run Binary Only" cancel button "Cancel" with title "Launch As Root…" with icon stop giving up after 30 -- allows editing and then running openFile
if button returned of result is "Run Binary Only" then
do shell script "logger -t 'AS DEBUG' " & (quoted form of runBinaryOnly)
do shell script runBinaryOnly with administrator privileges
else if button returned of result is "Open File" then
set openFile to text returned of result
do shell script "logger -t 'AS DEBUG' " & (quoted form of openFile)
do shell script openFile with administrator privileges
end if
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"}
end get direct types