Mounting shared disk, but only while on specific network.

Hi all… first off, very interesting website, I’m new to OS X, but I have a feeling ill like Applescript.

I do apologize if this has been posted before, a search didn’t turn up anything.

I know how to mount a shared disk using applescript on startup, and that works well however I was wondering if theres such a way to see if Im on a specific WiFi connection (SSID always the same) and if I am to mount those disks? Otherwise it will error out which isnt a big deal but it could be more seamless!

Model: MacBook
Browser: Firefox
Operating System: Mac OS X (10.4)

Nevermind, a simple try stopped any error!


Hi Jonsey,

this shell command determines the SSID of the current wireless network:

set AirportSSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | awk '/ SSID: / {print $2}'"
if AirportSSID is "mySSID" then
	-- mount disks
end if

That’s exactly what I needed. Thanks!