I'm making a macro to create a link between items in two OmniOutliner documents. The manual procedure is to:
select text in Doc. A,
copy as link (which puts the item's URL on the system clipboard),
go to the other document and issue the Create Link command,
in the resulting pop-up, enter the link title,
tab to the URL field,
paste the URL from the system clipboard.
With my macro, I'm trying to copy both the link and the selected text, then go to the other document and paste both in the above popup.
Thus, copy as link, then store that link on Clipboard_A, then while the text is still selected, copy that text to the system clipboard. Then go to the other document, open the Create Link popup, paste the text as the display title, tab to the URL field, then paste the URL I've stored on Clipboard_A.
But it's not working. It seems my Copy System Clipboard to Named Clipboard "Clipboard_A" isn't working. It just contains whatever was last in the system clipboard. I feel like I'm close, but not quite there yet! Thanks for your ideas...
There may be a much better way to do this, but here's what I have now:
At first, it didn’t work when running, but did work when stepping through with the debugger, so I figured it needed pauses in places besides the ones you suggested.
Ultimately I found it didn’t need the pauses you suggested in steps 6 and 8, but for some reason it did need them after steps 2 and 3. Maybe just quirks of OmniOutliner.
Thanks for your help! This will save a lot of time and mouse-clicking.