Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Shortcuts and Codea

edited November 27 in General Posts: 68

Hello,
My video..
https://dropbox.com/s/lp6uts5gfb93yya/rpreplay_final1574886485.mp4?dl=0

My script Codea:

-- Shortcuts

-- Use this function to perform your initial setup
function setup()
--# Clear Clipboard
pasteboard.copy()
--# Open App Shortcuts
openURL("shortcuts://run-shortcut?name=loadImage")
img = nil
end

-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(40, 40, 50)
-- This sets the line thickness
strokeWidth(5)
-- Do your drawing here
if img then
sprite(img, WIDTH/2, HEIGHT/2, WIDTH, HEIGHT)
else
img = pasteboard.image
end
end

my script Shortcuts:

https://www.dropbox.com/s/hrd4tjbp3tpsmok/img_0559.png?dl=0

Comments

  • dave1707dave1707 Mod
    Posts: 7,923

    @Diablo76 Can you explain what you’re showing here. I’m not sure what to make of this. My shortcuts app is in a folder with other apps that I’ll probably never use.

  • Posts: 68

    just play with command "openURL("shortcuts://run-shortcut?name=name of shortcut")"

  • dave1707dave1707 Mod
    Posts: 7,923

    So you’re using Codea to run things that can be controlled using the shortcuts app.

  • Posts: 68

    yes

  • dave1707dave1707 Mod
    edited November 28 Posts: 7,923

    I tried it with the camera. I created a shortcut to take a picture and from Codea I called the shortcut. I could hear the camera take the picture, but it didn’t show up in the Photos app. Not sure where the picture went.

    PS. The picture didn’t go anywhere. I had to add save to recents to the shortcut. So from Codea I took a picture and saved it to the recents folder in photos.

    This can get interesting with all the shortcut options. Thanks @Diablo76

  • edited November 28 Posts: 68

    @dave1707 oui je pense que ce thread va amener quelques raccourcis lol
    ho sorry my english is bad:
    yes I think this thread will bring some shortcuts

Sign In or Register to comment.