Feature Request

@Simeon I’ve been playing around with pasteboard a lot and it’s a very handy feature. In some of my projects, I switch to another app, copy text/image and switch back to Codea. I was wondering if it would be possible to have a Codea function that gets called when switching back to Codea from another app. This would be handy for pasteboard use as well as calling pause states in a game if the project is left.

Something like:

function onEnter() --Called when Codea is switched to from another app.
str = pasteboard.text
gamePaused = true
end

I’ve been using this bit of code to accomplish the above. This works because Codea stops drawing when the project is left.

-- in draw()
local t = tonumber(os.date("%S"))
            if t - LoopTime > 1 then
                --do something
            end
            LoopTime = t

nice trick.
about your request: how would codea know the project to start? so you must have a project running. then, why not just use your trick? it is so simple.
i would rather like an http-scheme to call codea, as they have in pyhton…

@Jmv38 that’s in the plans

@Simeon x-callback-urls would be awesome. @Jmv38 the above function works, just thought a Codea function would be useful.

@Simeon - Cool. :slight_smile: If you’re using the runtime (@Briarfox), it’s super easy (IDK about the x-callback-urls part).