Forum Archive

Launch Center Pro and delayed workflow

mjakubowiak

I use Launch Center Pro to quickly create a new file in Editorial with some text defined by LCP prompt. I use this URL:

editorial://new/{{drafts/draft.md}}?root={{dropbox}}&input=[prompt-return]&command={{DraftPaste}}

DraftPaste workflow is a simple Editorial workflow with just one action: replace selected text with Input (and the input is defined in LCP).

Now, it usually works like a charm. But if Editorial is not used for a longer time, this action will create a new file, but won't paste any content. It looks like the input is lost when Editorial starts up.

Do you have any ideas how to fix it?

Judithdrive

I had a similar problem with a similar workflow -- all it did was open a file (in the editor) and append the contents of the clipboard to it. The file always opened, but sometimes---especially after not being used for a while---the paste didn't happen. I had to paste it manually. It was as if the opening of the file by Editorial was non-blocking, and the paste occurred before the file was ready.

I found, however, that if I use Editorial's built-in "Open URL" action, with the "Wait until loaded" switch on (to the "In-App Browser"), the call to the Editorial URL works perfectly every time. So I now call a "staging" workflow, which consists of a small Python script that reconstructs the Editorial URL, followed by the "Open URL" action to make the actual call. I haven't seen the problem since.

For me this isn't as much of a kludge as it sounds: I call the final action from both inside and outside Editorial, and the internal calls were made from Python. So I already had the script in place to modify, and I just added the "Open URL" action.

mjakubowiak

Thanks! Would you be so kind to share your workflow?

Judithdrive

Sure. I'll post them in a day or so.