copy-public-url
copy-public-url copied to clipboard
Deal with growl not being present
http://dl-web.dropbox.com/u/29440342/screenshots/SSWTTH-Screen_Shot_2012.12.6-0.20.18.png
A friend on ML with no growl had to comment out the whole growl section to make it work. Surprising given I have a check for it.
Related issue: #5 Clickable Growl notifications
Another reported issue about this problem, on Lion: https://groups.google.com/forum/?fromgroups=#!topic/growldiscuss/Vn3-8SFGb9E It was never responded to.
According to http://growl.info/documentation/applescript-support.php, the check we already do for GrowlHelper should be sufficient.
Testing this myself by uninstalling growl as per: http://growl.info/documentation/growl-package-removal.php#1.2easy Was able to reproduce easily enough... whenever I tried to save (that is compile) the appelscript.
Turns out that AppleScripts are compiled and require linking in the dictionaries (effectively headers) of any application referenced by a "tell" statement. So at compile time, you must have that application installed.
More info:
- http://stackoverflow.com/questions/6275832/get-rid-of-choose-application-dialog-when-app-couldnt-be-found-in-applescript
- http://macscripter.net/viewtopic.php?id=24569
There doesn't seem to be much of a work-around for the compiling scenario. The workaround for checking if GrowlHelperApp is present will help for the run-time scenario, but it will require distributing the pre-compiled copy-public-url.scpt file.
We should also document the growl dependency in the README.md, and test with future versions of Growl (I have 1.2.2).
Just got ML myself. Notifications look good.
No bindings from Applescript except via growl 2.0 (which I don't want, I think.) But there's this handy library/script:
https://github.com/alloy/terminal-notifier https://github.com/alloy/terminal-notifier/downloads
To use the program, I tested the following (it works!)
~/Downloads/terminal-notifier_1.4.2$ ./terminal-notifier.app/Contents/MacOS/terminal-notifier -message "Hello, this is my message" -title "Message Title" -execute "open -a Preview.app ~/Dropbox/Public/screenshots/AJPWJD-Screen_Shot_2012.12.10-16.18.45.png"
Can't change the icon without recompiling.
Have to decide if I want to force the user to install it manually, or to auto-install this as part of the setup.