Reworked the module a bit, added previous line function and line number indication.
26/06 UPDATE
Module revision beta shared:
It's now possible to load next lines out of the text file, each click on the preview button loads the next line into the preview screen so that it can be read (and edited if necessary) before broadcast.
HOW TO USE IT FOR LIVE SMS BROADCAST:
Necessary tools:
• 1 bluetooth cellphone
• 1 bluetooth enabled mac
• MegacellX software (download trial here)
• this applescript
• My sms module, downloadable from the modul8 online library or here
• a txt file called sms.txt on your MACINTOSH HD root
Setting up MegacellX:
Connect your bluetooth enabled cellphone to MegacellX, if you have any problems with this matter check the MegacellX FAQ
When this is all set go to the MegacellX preferences and select the SMS tab, check the message received Applescript and select the one you just downloaded (if you haven't get it here).
After setting up an empty text file called sms.txt into your MAC HD root test this first part by sending yourself an SMS, make sure MegacellX is running and that your cellphone is connected. After receiving your own message check the textfile, it should display your phone number followed by the message you entered.
On to Modul8:
If that went well, time to open up Modul8. Get my module from the online library (or here), load it up and click the preview button. The message you sent earlier should display in the preview window, that way you can preview the messages before broadcasting, click show sms to display it in the output and click scroll txt to scroll.
You're able to set scroll speed, text position and the regular type settings from the text module.
Whenever you get a new message, click the preview again and it should display the newly arrived message.
You could also use it to display ready made text messages line by line the same way you use it for SMS display.
I'll probably be adding automation to the system, with an adjustable time delay for the message display in a later stage together with a panic button to hide the text or replace it with another (adjustable) text for unfriendly messages
Critics, comments, recommendations, ... all in- or output is more than welcome!
Grts, Kevin
UPDATE + NEED HELP
What it's already doing:
• reading the text from the external text file (place sms.txt into your root folder: Macintosh HD)
• preview in textfield (press PREVIEW)
• displaying it onto a layer (press SMS)
• moving the imported text like a marquee from left to right (press START), the time it takes is dependent on variable text length and adjustable speed.
• option buttons to position the marquee TOP-CENTER-BOTTOM
• font and font size control
NEED HELP:
Everything works perfectly but there's one major bug: selecting another layer (changing the layer focus) makes the SMS layer stop and the newly selected move.
I believe this should be able to be fixed using the KeywordEvent but I just can't seem to get that part working.
If anyone could give me a hand on that one, help would be very appreciated.
I've added the module to the online library (SMS Module Alpha) to make the coding and testing easier
UPDATE:
Making good progress with the module, it's loading the external text file and rendering it on a layer by the press of a button.
I'll be sharing it and making a tutorial for the bluetooth cellphone connection in a later stage too.
FIRST POST:
Hi there,
Me and mate had the SMS Module thing in mind for a long time and we decided to give it a go.
What we want it to do;
1. Automatically fetch incoming sms messages via a bluetooth connection between laptop and cellphone
2. Write the messages to a txt file
3. Import the txt file content into modul8 using python
First two parts are up and running, now it's only a python matter.
We tried working with the text module as a base for the SMS module but our python skills are let's say nihil.
Message event:
Code: Select all
#print msg,param
#reading in the txt file? > error: no such file or directory: 'sms.txt', where to put the txt file?
txtfile = open('sms.txt', 'r')
sms = txtfile.readline(0)
#how to write the sms into the text layer?
if msg == 'textField' :
modul8.setValue('direct_layer_text_field',param['text'],0) # < change the param?
elif msg == 'textSize' :
modul8.setValue('direct_layer_text_size',param['value'],0)
elif msg == 'textFont':
if 'selection' in param :
modul8.setValue('direct_layer_text_fontName',param['selection'],0)
I believe this must be quite easy to code if you have better python knowledge than we have.
Any help is much appreciated!
Greets,
Kevin