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.


    Select group message mark as read automate

    Pythonista
    sms select
    2
    16
    3755
    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.
    • smiddleton
      smiddleton last edited by

      I was wondering if somebody could help me. I’m trying to write a script that will automatically select a specific group texts and market as read automatically at a certain time every day. Is there anyway to do that? I’ve looked a lot in the documentation and I can’t seem to find what I’m looking for if anybody can help me get started that would be really helpful thank you so much for any help you can give me!

      cvp 2 Replies Last reply Reply Quote 0
      • cvp
        cvp @smiddleton last edited by

        @smiddleton The standard Apple Shortcuts app allows to define an automation shortcut which could start, every day, a Pythonista script doing your hoped process.

        1 Reply Last reply Reply Quote 0
        • smiddleton
          smiddleton last edited by

          Thank you for your reply. Is there any help you could give me in starting the script? I’m not sure which API to use?

          cvp 2 Replies Last reply Reply Quote 0
          • cvp
            cvp @smiddleton last edited by cvp

            @smiddleton My answer was only to explain how to run a script every day automatically, not the script it-self, because I don't understand what your script would do, sorry, obviously due to my poor English.

            I don't understand this "select a specific group texts and market as read "

            Shortcut automation (in French but it will be in your language in Shortcuts app)

            Actions

            1 Reply Last reply Reply Quote 0
            • cvp
              cvp @smiddleton last edited by cvp

              @smiddleton but, Unfortunately, your device has to be active.

              1 Reply Last reply Reply Quote 0
              • cvp
                cvp @smiddleton last edited by cvp

                @smiddleton For information, if you have the Pyto app, you can create a shortcut executing some short Python code as "Pyto code" which does not need any user interaction and can run in background without opening the Pyto app and without opening your iDevice. This code may even create a file in the iCloud Drive Shortcuts app.

                Not sure it could help you because I don't know yet what your script should do.

                1 Reply Last reply Reply Quote 0
                • smiddleton
                  smiddleton last edited by

                  I will checkout Pyto app. Thanks. I am on a group text thread that is mildly important for me to check every so often. But I don’t want to see the number of unread messages that builds up if I don’t look at. It gets pretty high pretty fast. What I want to do is simply mark all the messages as read, anytime a message comes in on that text group. I can’t leave the group since it is a mix of Android and IOS users.

                  1 Reply Last reply Reply Quote 0
                  • smiddleton
                    smiddleton last edited by

                    Pyto app looks good. Just can’t figure out where to start with the code. I guess it would be a widget.

                    cvp 2 Replies Last reply Reply Quote 0
                    • cvp
                      cvp @smiddleton last edited by

                      @smiddleton if you want that your script can run in background, even your device off, I think that your script has to run outside of an open app, either Pythonista or Pyto.
                      But if you have Pyto, the Apple Shortcuts app provides an action called "Execute Pyto code" where you can put a short Python code which runs outside Pyto.

                      This is an example that I have tested with a daily automation. It runs even device off and does not start Pyto app.

                      1 Reply Last reply Reply Quote 0
                      • cvp
                        cvp @smiddleton last edited by

                        @smiddleton Personally, I never use Pyto, I prefer Pythonista but in this last case, Pyto works in background.

                        1 Reply Last reply Reply Quote 0
                        • smiddleton
                          smiddleton last edited by

                          Thanks for the help. I am trying that example. Would happen to know what API I would use for selecting the group message and then marking it as read? I still can’t find it.

                          1 Reply Last reply Reply Quote 0
                          • smiddleton
                            smiddleton last edited by

                            I can get a widget to run, but. I still can’t find the right module or API to “select messages” from the text messages app. I’m starting simple and looking for that function first. Manually it is accessed by selecting the 3 dots in the top right and then clicking select messages.

                            cvp 1 Reply Last reply Reply Quote 0
                            • cvp
                              cvp @smiddleton last edited by

                              @smiddleton Sorry, I can't help you, not sure it is possible. Hoping another guy here could help

                              1 Reply Last reply Reply Quote 0
                              • smiddleton
                                smiddleton last edited by

                                Emma0122,
                                Thanks for posting. You say you are happy with the result. Does that mean you were able to get it working? Do you mind sharing the code you used? Thanks.

                                1 Reply Last reply Reply Quote 0
                                • smiddleton
                                  smiddleton last edited by

                                  That’s great to know. Do you mind sharing more details about how you got it working?

                                  cvp 1 Reply Last reply Reply Quote 0
                                  • cvp
                                    cvp @smiddleton last edited by cvp

                                    @smiddleton I think that @emma0122 is happy with the background process, not with the group messages process, but I may be wrong

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Powered by NodeBB Forums | Contributors