Applescript dialog button that opens a folder
Hi, I'm struggling with a script I am trying to write in the applescript editor. I am trying to write a script that backs up my USB stick when I mount it on my mac which works in conjunction with DoSomeThingWhen, a technique I found online. I am a total beginner to the applescript editor and this is the first script I am writing. Here is what I have so far:
do shell script ¬
"rsync -rt /Volumes/'USB DRIVE'/ ~/'USB Backup'"
display dialog "USB DRIVE has been backed up" buttons {"Dismiss", "Open"} default button "Dismiss"
if "Open" then open location "/Volumes/'USB DRIVE'/"
The script is working in that it backs up the drive when I mount it however I wanted to change the default buttons from "ok" and "cancel" to "dismiss" (replacing "ok") and "open" which opens the drive in finder. It is this "open" button which I am having trouble with and i would appreciate any help.
Thanks, Adam
MacBook Pro (Retina, Mid 2012), OS X Mountain Lion (10.8.2)