Hi,
Most probably I am missing something here. When I run the script below from Share Sheet (directly from Files.app, not via Scriptable.app) then I get an empty object in the args.js
file
let fm = FileManager.local()
let fo = fm.documentsDirectory()
let fi = "args.js"
let aa = JSON.stringify(args)
fm.writeString(fo+"/"+fi, aa)
For this script I have selected all input types in “Share Sheet Inputs” inside Scriptable (Text, Images, URLs, File URLs) so it is available for most files in the Files.app, via Share > Run Script. But it seems that I never get any arguments passed to my script and the args.js
always shows an empty object. I was expecting to have something passed into the global args
object depending on the type of the input file.
Thanks,
Patryk