Open paulirish opened 11 years ago
@paulirish - thanks for giving this a try!
I wasn't able to reproduce your error (also on 10.8.2); the following worked
I cloned this repo to a new folder, and the following worked:
$ git clone git@github.com:dergachev/copy-public-url.git
$ cd copy-public-url
$ bash INSTALL.sh 123456
Ensuring '/Users/dergachev/Library/Scripts/Folder Action Scripts/' exists
Performing find-and-replace; setting property YOUR_DROPBOX_ID to '123456'
compiling copy-public-url.scpt
Creating symlink to dropbox-copy-public-url.scpt inside '/Users/dergachev/Library/Scripts/Folder Action Scripts/'
cleaning up: removing temporary files
Don't forget to associate copy-public-url.scpt as Folder Action for the desired folder.
To debug, comment out the last line INSTALL.sh which reads as following:
rm "$SOURCE_SCRIPT.modified"
Then re-run INSTALL.sh and you'll have copy-public-url.applescript.modifier
in the folder. Rename it as copy-public-url.applescript.modifier.applescript
(or something) and try opening it up in Applescript Editor. If that fails, post it here and I'll take a look.
The line 158 was in the Growl section, so perhaps you don't have Growl installed? That would be a known issue: #7. However I'm pretty sure Dropbox bundles it in: https://www.dropbox.com/help/48/en
To test if growl is present, you can try opening and running this debug applescript:
The quote mark the error is about is the very first quote in this line:
"CopyDropboxURL" all notifications allNotificationsList
I don't have growl installed and likely won't install it, as they now have shifted to an App Store paid policy. Can the copy-public-url continue regardless of if growl is installed?
you can replace the surrounding if-else block with something like:
display dialog "copied"
if you don't have growl installed
At some point I'll need to get around to rewriting this to use 10.8 notification center.
@shedali - Unfortunately Applescript is sort-of statically compiled, which means if my code references Growl, it must be installed.
To find if an application is installed without having to run the application, use:
try
tell application "Finder" to get application file id "bundle.id.here"
set appExists to true
on error
set appExists to false
end try
Source: http://stackoverflow.com/questions/14297644/check-if-an-application-exists-using-applescript
compiling manually on os x 10.8.2 I've set my default ID in the config sh.
Not really sure what's going on here as I'm unfamiliar with applescript syntax.. Any ideas why it's barfing on compile?