Hi All
What i am trying to achieve is to map external drives from my NAS only when my MBA is connected on a specific SSID
I found few scripts that check the SSID and I have the relevant applescript. There is a variable you can use with automator but this is only to display the IP and not the current SSID.
The way I have it so far is (Automator application is called MapDrives):
automator:
1) pause 7 seconds
2)Get value of variable (IP)
3)Run Applescript below (the script needs tweaking)
4) Get Specified servers
5)Connect to servers
What I also need to check if the drives are already mapped then not to proceed with the script?
What i am trying to achieve is to map external drives from my NAS only when my MBA is connected on a specific SSID
I found few scripts that check the SSID and I have the relevant applescript. There is a variable you can use with automator but this is only to display the IP and not the current SSID.
The way I have it so far is (Automator application is called MapDrives):
automator:
1) pause 7 seconds
2)Get value of variable (IP)
3)Run Applescript below (the script needs tweaking)
Code:
on run {input, parameters}
set tIP to do shell script "ifconfig en0|grep 'inet '|cut -d ' ' -f 2"
if (tIP as text) is not equal to "<ip address of my MBA>" then
tell application "MapDrives" to quit
end if
end run
4) Get Specified servers
5)Connect to servers
What I also need to check if the drives are already mapped then not to proceed with the script?
Last edited: