My script works in applescript editor but doesn't take the condition to adjust Indigo variable as soon I try to execute it from IndigoServer.
here is the script, someone would have an idea
thanks
set the result to "0.0"
set theIP to "192.168.1.110"
set theTimeout to 20
set theResult to do shell script "/sbin/ping -qon -c 1 -W " & theTimeout & " " & theIP & " | /usr/bin/grep % | /usr/bin/sed \"s/.*,\\ //\" | /usr/bin/sed \"s/%.*//\""
if theResult is "" then
set theResult to 100
end if
if theResult = "0.0" then
tell application "IndigoServer"
set value of variable "iphone" to "home"
end tell
else
tell application "IndigoServer"
set value of variable "iphone" to "out"
end tell
end if