Hi guys.
Im new to apple scripts, and found some small guides on the net to get some of my script going.
I want to make my script connect to my nas, when it finds it on the network.
If it doesn't find the nas, it will delay the script and try again in 60min.
I know where to put it in my script, I just dont know the real command to make it postpone it and retry later.
My script looks like this so far:
Im new to apple scripts, and found some small guides on the net to get some of my script going.
I want to make my script connect to my nas, when it finds it on the network.
If it doesn't find the nas, it will delay the script and try again in 60min.
I know where to put it in my script, I just dont know the real command to make it postpone it and retry later.
My script looks like this so far:
Code:
-- Check IP address is reachable
set IP_address to "192.168.0.3"
set IP_Valid to true
try
do shell script ("ping -c 2 " & IP_address)
on error
set IP_Valid to false
end try
-- IF found.
if IP_Valid then
-- MOUNT DRIVE
mount volume "smb://192.168.0.3/Bluray"
mount volume "smb://192.168.0.3/Bluray2"
mount volume "smb://192.168.0.3/DVD"
mount volume "smb://192.168.0.3/Dokumentar"
mount volume "smb://192.168.0.3/Standup"
mount volume "smb://192.168.0.3/TV"
set endresult to "win"
else
-- DO NOTHING
set endresult to "fail"
end if
Last edited by a moderator: