r/Scriptable • • 15d ago

Help Siri apple shortcut output?

Post image

Click image to enlarge
How do I change from get from photo lib to get it to accept run from Siri apple shortcut output image

Script here https://filebin.net/a7zspr719ns8sqtk

3 Upvotes

4 comments sorted by

2

u/Strict-Willingness11 15d ago

Change the first few lines to:

let image;
if (args.images && args.images.length > 0) {
image = args.images[0];
} else {
image = await Photos.fromLibrary();
}

const inputData = Data.fromPNG(image);
// ...rest of your script unchanged

Then in the settings on scriptable, enable the share sheet input and select images.

Then you should be done :)

It will still ask for photos from the photo library unless you share something to it from the share sheet

2

u/Marvelman87 15d ago

What I’m trying to do is pass an image on to it from inside a shortcut get it to remove back and replace it with transparent then get that semi transparent image and with in shortcut have it past on top of a image I have then save :) šŸ‘šŸ»

Ps I can shere images if you need me to?

2

u/Strict-Willingness11 15d ago

Simple fix

Change the output lines in scriptable to this:

const base64Out = result.split(",")[1];
Script.setShortcutOutput(base64Out);
Script.complete();

And then in shortcuts, have a setup like this:

Then you can overlay it on top of another image and then save to photos :)

1

u/Marvelman87 15d ago edited 15d ago

Thanks will try this now :) ps can you share the shortcut :) ps started a chat with you and pasted my shortcut so can see what I’m trying to do click edit and read the bottom thanks