Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Deep_Thought

macrumors 6502
Original poster
Oct 13, 2008
452
34
Hi all,

Does anyone know if its possible to create a workflow/package that monitors connectivity to a networked folder and if the connection breaks, either displays a warning message, or quits a specific application?

I have a program that depends on connectivity to a share, however the program doesn't do anything if the connection breaks.. :(

Cheers
 
The basics of an AppleScript based solution would be something like this:

Code:
on idle
   if (list disks) does not contain "Your Share Name Goes Here" then
       activate
       display dialog "Where is it?" buttons {"OK"} giving up after 5
   end if
end idle

...save it as a stay open applet.

Whenever the Mac is idle, the app will pop up the warning if a share with the name you define is not in the list of mounted shares. It's only intended to be a snippet to get you started - you'll probably want to finesse it somewhat!

Its a bit of a clunky solution. There are probably slicker ways, but it should work.

Good luck
 
Thanks, I only want this to run when the application that depends on the share is running.

Thinking about it, thats not really going to be possible without having it running constantly and first of all performing a check for whether the application is open or not. How much of a resource drain would this have? Negligible?

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.