Apple Script to Send Text when Ladiocast Disconnected and reconnects

14 views Asked by At

I have a script that restarts the App 'Ladiocast' when it stops.

This Works

on diswitherror(1) repeat 6000 times delay 10 try tell application "LadioCast" to connect 1 return end try end repeat end diswitherror

I created this and it works

tell application "Messages" to send "Ladiocast Stream disconnected" to buddy "xxx-xxx-xxxx" of (service 1 whose service type is iMessage

However when I add them together it does not.

on diswitherror(1) tell application "Messages" to send "Ladiocast Stream disconnected" to buddy "xxx-xxx-xxxx" of (service 1 whose service type is iMessage) repeat 6000 times delay 10 try tell application "LadioCast" to connect 1 return end try end repeat tell application "Messages" to send "Ladiocast Stream Connected" to buddy "xxx-xxx-xxxx" of (service 1 whose service type is iMessage) end diswitherror

I don't know where to go next!

0

There are 0 answers