Is it possible to run external file scripts from Shortcuts?
As title, I'd like to trigger a script which I've opened from Working Copy. What's the smoothest way to achieve this?
I'm aware that it's possible to open files that are in iCloud Drive via an iOS deep link, but couldn't find a similar workaround for external files.https://reversephonelookup.onl/ https://curated.onl/nba-reddit/ https://pcbuilder.onl/pcpartpicker/
Thanks in advance!
@DavidFernas you could, via Shortcuts, launch a little Pythonista script running in Python2
and launching it-self your external file script in Pythonista3
Tested and ok:
#!python2 from objc_util import * dir = '/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/.../xxx.py' arg = '' #dir = os.path.expanduser('~/Documents/'+app) I3=ObjCClass('PYK3Interpreter').sharedInterpreter() # run a script like in wrench menu (path, args, reset env yes/no) I3.runScriptAtPath_argv_resetEnvironment_(dir, [arg], True)
I'm (almost) sure you could even pass the external script url as argument of little script, not tried
This post is deleted!last edited by bhaiterabhai