Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- property user_name : ""
- user_name = "" # Added in because sometimes the script would magically remember the values of its last run despite being terminated?
- if user_name is "" then
- set dialog_1 to display dialog "Please enter your username so I can dismount the corresponding volume" default answer ""
- set the user_name to the text returned of dialog_1
- end if
- tell application "Finder"
- try
- set remoteDisk to disk user_name
- eject user_name
- on error
- display dialog "Oh dear, I couldn't find a volume of that name (" & user_name & ") to unmount!" & return & return & "Have you had enough vitamin c today?" buttons {"No"} default button 1
- end try
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement