Hey all,
I am very new to both Arduino and Apple Script, but I am using an Arduino Uno, that will get inputs from different sensors and then write an Integer, for example "34", depending on what data the sensors read, for
Now I want to let Apple Script play the 34th song of my iTunes Playlist. To do this I want Apple Script to read the Serial Monitor, I read several Forum posts and googled, but I can't find a solution that works.
Is this possible? How does the command in Apple Script look that can read the last line(s) of the Serial Monitor? Or do I need to use another kind of Serial Monitor in order to do this?
Any help is greatly appreciated! Thanks 
I don't think you want to read the Serial Monitor, since that's just something that happens to take Arduino's serial output and displays it. What you probably mean is that you want your Apple to ingest the Arduino serial output and display perform some process on it.
The output from the Arduino serial interface is plain old serial at whatever baud rate you specify and with a certain word length, parity and number of stop bits which defaults to 8N1.
I suppose someone here might know how to read that on the Apple side, but you'd be better off asking that on an Apple forum I'd say.
Okay, thanks! Yeah that makes sense, I will try to ask there!
Take a look at MacWise. It claims to be scriptable. I just had a short look into the manual, it has commands to send text and to copy received text into a file or to the clipboard