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.


    Sharing extension with arguments does not start

    Pythonista
    3
    6
    3985
    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.
    • skrohmer
      skrohmer last edited by

      Hi,

      Does anyone have an sharing extension running successfully which receives arguments at the call? I don't even get the simplest program running which only contains print 'hello'. When I leave the shortcut parameter "Arguments" blank the program runs. When I set the arguments to any string or number the program is not called.

      Stefan

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

        @skrohmer do you have an example of your code?

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

          Yes, see above: print 'hello' ;-) You don't really need code, one line printing some text (or sys.argv) is enough. Go to Settings / Share Extension Shortcuts -> create a new shortcut -> set Arguments to any value. After that run the extension by sharing any file. That's it.

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

            Sorry... I'm a little tired !

            It works for me though. Prints hello.

            Did you try using the apex module?

            import appex
            
            if appex.is_running_extension():
            	#share url from safari
            	print(appex.get_url())
            
            1 Reply Last reply Reply Quote 0
            • dgelessus
              dgelessus last edited by

              Can reproduce: https://github.com/omz/Pythonista-Issues/issues/87

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

                Wow... I just need to sleep. Sorry guys. I now see the problem too...!

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