Problems with Scripts and Alexa after moving to new MiniMac

Posted on
Wed Mar 03, 2021 1:20 pm
arskrett offline
Posts: 20
Joined: Jul 22, 2011

Problems with Scripts and Alexa after moving to new MiniMac

I recently upgraded my good old "Late 2009" MiniMac, it have been great, but there was several plugins etc. that now demanded High Sierra or later. so it was time.

Anyway, I did a complete "Migration" and it worked surprisingly well, only a few minor things that needed adjustments afterwards.
The only 2 things I have issues with is Alexa Bridges not working and also I use quite a few scripts to save CCTV pictures and send to me on imessages when motion etc.
The scripts do execute, and the pictures get saved but not sent, I get the below error message. (the text part of message goes fine, just missing the image)

error "Messages got an error: Could not send specified file!" number 1

Any suggestion? both for the imessage issue and Alexa bridge issue?

Thanks

Posted on
Wed Mar 03, 2021 3:18 pm
autolog offline
Posts: 3519
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Problems with Scripts and Alexa after moving to new Mini

arskrett wrote:
... Any suggestion? both for the imessage issue and Alexa bridge issue?


Will need a more info regarding your issue with Alexa. What isn't working and are there any log messages?

Typically, when Alexa doesn't work (if it has been working), it is down to Network issues.

Posted on
Wed Mar 03, 2021 10:36 pm
arskrett offline
Posts: 20
Joined: Jul 22, 2011

Re: Problems with Scripts and Alexa after moving to new Mini

Alexa problem sorted, and you were right. it was network issue. for some reason the Alexa Bridge plugin had changed to a random IP adr, I use static on my Indigo machine. Thanks.

But I still have the iMessage problem. will not send the pictures. Anyone have a suggestion?

Posted on
Thu Mar 04, 2021 4:37 pm
autolog offline
Posts: 3519
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Problems with Scripts and Alexa after moving to new Mini

arskrett wrote:
... I still have the iMessage problem. will not send the pictures. Anyone have a suggestion?

Please provide a bit more information on the issue and share your script so the error can be seen in context? I am unclear as to how you are sending to iMessage. :)

Posted on
Sat Mar 06, 2021 2:06 pm
arskrett offline
Posts: 20
Joined: Jul 22, 2011

Re: Problems with Scripts and Alexa after moving to new Mini

A sample of a script that sends 4 pictures from my "Front PTZ" camera.
There is another script that captures and saves the pictures BEFORE this script executes. that script works fine, the pictures does get saved (in that location).
One thing I thought might be the issue was the location of the pictures, but new minimac is named exact same and the folder structure is exactly same.

any suggestion?, all these scripts worked fine before and it is only the sending pictures who dont work, sending a plain text works on nem minimac also...


Code: Select all
tell application "Messages"
   set iMessageService to 1st account whose service type = iMessage
   set imessagebuddy1 to participant "xxxxxx@icloud.com" of iMessageService
   set theAttachmentPTZ1 to POSIX file "Desktop/FrontPTZ1.jpg"
   set theAttachmentPTZ2 to POSIX file "Desktop/FrontPTZ2.jpg"
   set theAttachmentPTZ3 to POSIX file "Desktop/FrontPTZ3.jpg"
   set theAttachmentPTZ4 to POSIX file "Desktop/FrontPTZ4.jpg"
   
   delay 2
   send file theAttachmentPTZ1 to imessagebuddy1
   send file theAttachmentPTZ2 to imessagebuddy1
   send file theAttachmentPTZ3 to imessagebuddy1
   send file theAttachmentPTZ4 to imessagebuddy1
   
   
   
end tell
end run

Posted on
Sat Mar 06, 2021 3:25 pm
jay (support) offline
Site Admin
User avatar
Posts: 16902
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Problems with Scripts and Alexa after moving to new Mini

If you're sure the files exist, then my next guess is that you need to specify the full path to the file rather than just the relative path:

Code: Select all
set theAttachmentPTZ1 to POSIX file "/Users/YOURUSERNAME/Desktop/FrontPTZ1.jpg"

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Mar 06, 2021 3:41 pm
arskrett offline
Posts: 20
Joined: Jul 22, 2011

Re: Problems with Scripts and Alexa after moving to new Mini

set theAttachmentPTZ1 to POSIX file "/Users/YOURUSERNAME/Desktop/FrontPTZ1.jpg"


That worked... but I have used these scripts for years and no problems... must be something with upgraded OS?..


Thanks, (I have about 30 scripts that need updating now...)

:)

Posted on
Sun Mar 07, 2021 3:40 pm
jay (support) offline
Site Admin
User avatar
Posts: 16902
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Problems with Scripts and Alexa after moving to new Mini

arskrett wrote:
must be something with upgraded OS?..


That would be my guess. It's always best practice to use full paths rather than relative paths IMO.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest