omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Text message app thanks to ccc

    Pythonista
    2
    2
    2062
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • reefboy1
      reefboy1 last edited by

      This is an app that I modded a bit. Original code was written by @ccc
      This is my modded version

      import clipboard, webbrowser
      msg = 'I am texting you through pythonista!'
      tel = raw_input('number ')  # can be a phone number or Apple ID
      clipboard.set(msg)       # once iMessage opens, do a Paste into the message body
      webbrowser.open('sms:' + tel)
      
      1 Reply Last reply Reply Quote 0
      • pacco
        pacco last edited by ccc

        Nice. Here's some UI-goodness wrapped around. (Caveat: Suffers from known bug that doesn't focus the alert input fields and I agree -- still not as nice as Editorial's builtin message-sender).

        import clipboard, webbrowser,console,sys
        msg = 'I am texting you through pythonista!'
        tel='' 
        try:
        	tel=console.input_alert('Text Sender','Enter Tel #/AppleID',tel)
        	msg=console.input_alert('Text Sender','Enter Msg text',msg).strip()
        #	if len(msg) > 128:
        #		console.hud_alert('Warning: SMS messages may be truncated)','error',2.00)
        except Exception as e:
        	sys.exit()
        clipboard.set(msg)       # once iMessage opens, do a Paste into the message body
        webbrowser.open('sms:' + tel)
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors