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.
Pythonista “Run script” action in Automator
-
In Automator there is now a Pythonista “Run script” action that takes “The name of the script to be run” as its argument. I have tried the name of the script, the Pythonista URL for the script, a fully qualified iCloud path, etc etc etc. Nothing works. If I want to run a Pythonista script “this_folder/foo.py” what do I enter as an argument for the action?
-
@kenficara try
MyScript.py?action=run
-
Thanks, @cvp — I tried that, with or without the query string. I also tried adding root=icloud since that’s where the script is. I tried it prefixed with pythonista:/// per the docs, prefixed with a leading slash, and prefixed with nothing as you show above.
The script is in an iCloud folder, so I’ve tried:
/folder/script.py?action=run&root=icloud
folder/script.py?action=run&root=icloud
pythonista3:///folder/script.py?action=run&root=icloud
-
@kenficara Sorry, as I don’t use Automator, I can’t help.
-
ICloud folders are funny, and not a subfolder of pythonista.
Try having a script in the main path, which you can then use cd or sys.path.insert to add the iCloud path, and maybe runpy or import, etc.
-
@kenficara As I said, I don't know Automator but I guess it could run a shortcut (of the Shortcuts app) and this shortcut could open an url running a Pythonista script via its url scheme.