Go Down

Topic: Display of unread mails OSX - AppleScript and Arduino (Read 105 times) previous topic - next topic

entspannt

May 15, 2017, 01:50 pm Last Edit: May 15, 2017, 02:03 pm by entspannt
Hi everyone,
After looking into this for a few hours without any result, I decided to ask for help...

I want to use my UNO to show me how many unread emails if have within OSX Mail.

Here's what I did so far:
- Create an AppleScript that shows me the number of unread mails
- Create a Processing sketch that tells Arduino to blink an LED

What's missing is the link between AppleScript and Processing or a direct link between AppleScript and Arduino. I tried SerialPortX but it seems not to work with macOS Sierra. I get the message that the script does not understand the message "serialport list".

Any help would be highly appreciated.

All the best,
Steffen

Robin2

When you have figured out how to get the Mac to send data to the Arduino you should have a look at the examples in Serial Input Basics - simple reliable ways to receive data.

I have no experience with Macs.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

PaulS

Quote
Here's what I did so far:
- Create an AppleScript that shows me the number of unread mails
Which you then modified to (try to) use SerialPortX.

Quote
but it seems not to work with macOS Sierra.
That seems extremely unlikely.

Quote
I get the message that the script does not understand the message "serialport list".
Well, it's your script. Make it understand the message, or stop sending it that message.

If you need help with the former, you probably should be asking on an Apple forum or, at a minimum, posting the script that you need help with.
The art of getting good answers lies in asking good questions.

entspannt

That seems extremely unlikely.
Do you have experience with SerialPortX and newer OSX versions? I put "SerialPort X.osax" into /Library/ScriptingAdditions/

Here's an excerpt of the code where I get the error now on the serialport open command:

Code: [Select]


global myPort

on run

set use_port to "/dev/cu.usbmodem1411"

set myPort to serialport open use_port bps rate 9600 data bits 8 parity 0 stop bits 1 handshake 0

end run


Go Up