Multiple Messages

Posted on
Fri Dec 16, 2016 4:36 pm
petematheson offline
Posts: 847
Joined: Sep 14, 2014
Location: Southampton, UK

Multiple Messages

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

Posted on
Fri Dec 16, 2016 7:26 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: Multiple Messages

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.

Image

Posted on
Sat Dec 17, 2016 4:01 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Multiple Messages

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

Late 2018 mini 10.14

Posted on
Sat Dec 17, 2016 4:15 am
petematheson offline
Posts: 847
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Multiple Messages

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests

cron