Results 1 to 4 of 4
  1.    #1  
    EDIT: DON'T USE MY CODE! There is a much simpler solution in the first reply!


    I wrote this shell script this morning to send txt messages from an ssh session so that i can type on my full size keyboard when I'm at my desk.

    echo "luna-send `more /media/internal/txtfront.txt`$1`more /media/internal/txtmid.txt`$2`more /media/internal/txtend.txt`" >/media/internal/txt.txt
    echo /media/internal/txt.txt | /bin/sh
    The txt files referenced are the parts before, between, and after the two values you have to change in the txt messaging line of the luna-send reference over at webos internals. (sorry, i couldn't post a link due to my low post count)

    The usage is: ########## "message to send"
    where the bangs represent the 10-digit phone number to send to.

    And yes it does work.


    Last edited by the1williegeorge; 11/09/2010 at 09:31 PM. Reason: Simpler solution
  2. #2  
    This seemed simpler, just paste this in and then usage is the same,

    sh 1231231234 message

    luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{"recipientJSONArray": [{"lastName": "", "pictureLoc": "", "contactCount": 1, "displayText": "", "firstName": "", "pictureLocBig": "", "imAvailability": 6, "pictureLocSquare": "", "contactDisplay": "", "Person_id": "", "personId": "", "type": "phone", "value": "'$1'", "alreadyValidated": true, "prefix": "to$A", "identifier": ""}], "messageText": "'$2'"}'
    This is a really cool idea, I had never thought of doing this with my phone before. This is the link to the webos internals page I think you were refering to: Luna Send - WebOS Internals
  3.    #3  
    THAT'S how you do that! I kept getting messages consisting of $2 going to numbers of $1. I had no idea where I should be putting those extra single quotes.

  4. mauro1's Avatar
    205 Posts
    Global Posts
    213 Global Posts
    How about this approach, to avoid having to quote the message. Also take opportunity to remind the user the Usage.

    if [ $# -lt 2 ] ; then 
    	echo "Usage: ${0##*/} Destination Message"
    	shift 1
    	luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{"recipientJSONArray": [{"lastName": "", "pictureLoc": "", "contactCount": 1, "displayText": "", "firstName": "", "pictureLocBig": "", "imAvailability": 6, "pictureLocSquare": "", "contactDisplay": "", "Person_id": "", "personId": "", "type": "phone", "value": "'$destination'", "alreadyValidated": true, "prefix": "to$A", "identifier": ""}], "messageText": "'$message'"}'
    Last edited by mauro1; 11/09/2010 at 10:08 PM. Reason: not a quote, but code.
    Palm Pilot -> IBM WorkPad -> Handspring Visor -> Palm VIIx -> Palm T|X -> Palm Pre -> US GSM Palm Pre 2 [shelved] and 16GB HP TouchPad [died] -> (Samsung GNex and 32GB HP Touchpad with CM9)

Posting Permissions