What's the correct syntax in the Applescript below to make this app run by double clicking on it rather than how it runs now by just running the Applescript in the AS script editor?
The Shell script is located at:
And it is set to execute by all. (I did chmod a+x toggle.sh)
set bottomRoot to (path to me) as alias tell application "System Events" set myPath to (POSIX path of container of bottomRoot) end tell set scriptPath to quoted form of (myPath & "/toggle.sh") do shell script scriptPath
#!/bin/sh STATUS=`defaults read com.apple.finder AppleShowAllFiles if [ $STATUS == TRUE ]; then defaults write com.apple.finder AppleShowAllFiles FALSE else defaults write com.apple.finder AppleShowAllFiles TRUE fi killall Finder sleep .5 open .