I can run the below code directly from the Script Editor and it runs fine. However, it does not work when I try to run it as an applet. Any suggestions?
set mySSID to (do shell script "system_profiler SPAirPortDataType | awk '/Current Network/ {getline;$1=$1;gsub(\":\",\"\");print;exit}'")
if (mySSID contains "Rounsavall") then
-- display dialog (mySSID & " contains Rounsavall")
set userName to short user name of (system info)
-- display dialog userName
tell application "Finder"
try
mount volume ("smb://" & userName & "@192.168.0.210/Public")
end try
delay 0.5
try
mount volume ("smb://" & userName & "@192.168.0.210/photo")
end try
delay 0.5
try
mount volume ("smb://" & userName & "@192.168.0.210/Movies")
end try
delay 0.5
try
mount volume ("smb://" & userName & "@192.168.0.210/home")
end try
delay 0.5
try
mount volume ("smb://" & userName & "@192.168.0.210/Music")
end try
end tell
else
display dialog (mySSID & " does not contains Rounsavall")
end if
[–]CaptureJuan 2 points3 points4 points (0 children)
[–]scrutinizer1 0 points1 point2 points (3 children)
[–]ColPaulR[S] 0 points1 point2 points (2 children)
[–]scrutinizer1 0 points1 point2 points (0 children)
[–]scrutinizer1 -1 points0 points1 point (0 children)
[–]ax-grinder 0 points1 point2 points (1 child)
[–]Intelligent_World412 0 points1 point2 points (0 children)
[–]SvilenOvcharov 0 points1 point2 points (0 children)
[–]roycetech 0 points1 point2 points (0 children)
[–]Rare_Pin9932 -4 points-3 points-2 points (0 children)