Page 1 of 1

Multiple Messages

PostPosted: Fri Dec 16, 2016 4:36 pm
by petematheson
So I'm using the script below to send a CCTV image to me and the wife, however it randomly sends me the same image twice, sometimes 3 times.

Any reason why?

Set frontdoor_pic to "/Users/Home/Downloads/frontdoor.jpg"
Tell application "SecuritySpy"
Capture image camera name "Front Door" as frontdoor_pic
With overwrite
End tell

Tell application "Messages"
Set DestFile to POSIX file "/Users/home/Downloads/frontdoor.jpg"
Send file DestFile to buddy "Pete"
Send file DestFile to buddy "Wife"
End tell

Re: Multiple Messages

PostPosted: Fri Dec 16, 2016 7:26 pm
by matt (support)
Is the problem that whatever Trigger executes the AppleScript above is occurring more than once? Check the Event Log window to see what is going on there – it might provide a clue.

Re: Multiple Messages

PostPosted: Sat Dec 17, 2016 4:01 am
by mat
are you triggering it from two different places? Silly question but thats why I got double messages a few months back and only a check for you, not a sloution

Re: Multiple Messages

PostPosted: Sat Dec 17, 2016 4:15 am
by petematheson
Ah ok, so yes it does seem to be triggering twice.
So my doorbell seems to be always 'open' and pressing it once seems to trigger it twice, sometimes 3 times. No idea why though...

Maybe if I put some logic to check if it's already been pressed recently to suppress further activations?


Sent from my iPhone using Tapatalk