Question: Q: Sending Images via iMessage with AppleScript Using AppleScript to send a message via iMessage, I can send plain text just fine. However, when I try to send a file, Applescript wants to send it using colon delimited paths and Messages doesn't understand how to interpret that. Jan 23, 2013 - Save the following script as sendMessage.applescript (Note: make sure to choose the Text option). Execute it by running: osascript sendMessage.applescript 'Hello there!' This will send an iMessage to the phone number 123-555-1234 containing the text 'Hello there!'
So I have got this applescript that tries to get all images from a folder and sends them to a buddy through iMessage.
The folder will be framework like therefore:
The issue is certainly that when I go through all files to a adjustable as a chain and after that try out to set them to a
POSIX file
I get the mistake:Messages obtained an error: Can'testosterone levels obtain POSIX file '/Customers/user/Desktop/my-folder/image-name'.
How can I fixed
imageAttachment
properly to aPOSIX file
so that I can deliver it with iMessage?![Applescript Applescript](https://robservatory.com/postimages/_onetime/break_messages.png)
SethSeth
1 Answer
You are operating into AppleScript sandboxing. The Messages application will not possess entry to open that file. The technique can be to switch the pathways to POSIX files outside of the tell pads. This will let the entitlement engine move the entitlement into the say to mass so the application can open up it.
This code works:
Alan ShutkoAlan Shutko8,86622 platinum badges1717 magic badges2525 bronze badges
You must record in to remedy this question.
Not really the reply you're also looking for? Browse other questions tagged applescriptmessages.
I are trying to produce an applescript that will grab all of thetaggedtelephone quantities of 'cellular' and 'iPhone' from theeveryget in touch with in Connections App (particularly the phone figures from the iCloud account), and after that send an iMessage or SMS to them using Messages App.
I believe I possess a good part of it, but I obtain 2 mistakes that I can't seem to recognize.
Corrected Mistake 1:
Contacts got an error: Can't get brand.
As software is over.Still experiencing Error 2:
Can't create «class arizona20» 1 of «class azf4» id '89E7AF18-A017-4119-B788-CBB96571FAAE:ABPerson' of program 'Contacts' into the anticipated type.
Billie Hawkins
Billie HawkinsBillie Hawkins