Go Back   The macosxhints Forums > OS X Help Requests > AppleScript



Reply
 
Thread Tools Rate Thread Display Modes
Old 11-16-2012, 04:15 AM   #1
jokerjack
Prospect
 
Join Date: Nov 2012
Posts: 1
Help with unmount on sleep

Hi - really hope someone can help me.. i have just setup sleepwatcher on my Mac mini running mountain lion to unmount my network shares on sleep. This is isnt working and i believe the issue is due to mountian lion sleeping before the script is executed as it runs when i do this with the OS up and running, my script is:-

#!/bin/sh
osascript -e 'tell application "Finder" to eject disks'

would it be easier to write a script to unmount the drives and then send the mac to sleep, i think i can assign a shortcut to launch the script and assign this to a button on my harmony remote. I use this machine as a HTPC and my NAS has a power schedule which is causing errors when the mac wakes up.

Thanks for any help you may be to provide
jokerjack is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 12:45 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.