Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Applescript droplet to get the SHA1 checksum' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Applescript droplet to get the SHA1 checksum
Authored by: rsnake on Mar 02, '11 10:27:47AM
There's a typo in the code for droplet. It should be
do shell script "/usr/bin/openssl sha1 " & quoted form of POSIX path of chosenFile
instead of
do shell script "/usr/bin/openssl sha1" & quoted form of POSIX path of chosenFile
So the whole script should be:

-- if applet is double-clicked
set chosenFile to choose file with prompt "Select the file to checksum:"
do shell script "/usr/bin/openssl sha1 " & quoted form of POSIX path of chosenFile
display dialog result buttons {"OK"} default button "OK"

-- or if the file is drag and dropped
on open chosenFile
	do shell script "/usr/bin/openssl sha1 " & quoted form of POSIX path of chosenFile
	display dialog result buttons {"OK"} default button "OK"
end open
This works fine in 10.6

[ Reply to This | # ]