I use Scrivener for my research. most of the items there are found on the web. Prior to using keyboardmaestro, I have done this manually by
marking the content on the page, and copy it (command C)
switch to Scrivener
select new document and paste content there (command V)
select the URL and copy it
paste it into Scrivener in the field "Notes"
I have recorded these steps in Maestro, but the proces fails... probably / seemingly by the fact that "clipboard content" does not reflect the URL but keeps the first copy (of the page content).
I have then inserted in the start of my macro and once more before copying the URL, the Action: Delete current system clipboard, expecting a clean slate. But not so... then I have (without deep understanding) also inserted in the macro the commands that clears clipboard 1, 2 and 3.
No luck... but... to my amazement there is inserted som snippets I copy/pasted in word 8 hours ago, instead of the selected text and the URL
So I am looking for a deeper understanding of this macOS clipboard in combo with Maestro.
Finally – here's a macro that will let you copy text from Safari and run the macro to extract the HTML of the copied text from the system pasteboard (clipboard).
Woa thats a lot... but my concern is just to get the webadress, from the top of safari (as text sort of, not the tru URL) and I can get this simply by clicking + copy and the paste.
my headache comes from that the macro trained to do exactly this, will paste something different... and that different is mostly the text that was copied before from the webpage itself.
AND I cannot deduct where that text is kept (which clipboard).
So maybe the question is not so much with maestro more about those 'clipboards' and their persistent memories
Okay, I seem to have misunderstood what you were doing.
But I must tell you that this:
Is not clear at all.
The Mac essentially has one clipboard – the system clipboard. All of Keyboard Maestro's named clipboards and clipboard history items are just data in a file/database.
To use them one has to run them through the system clipboard again.
It would be best if you post your macro, so we can see what's happening and test for ourselves.
Sorry for non-articulate phrasing on URL etc.
Attached is a screenclip with an example of the link I need to copy. This goes fine when I stay in macOS, but not so much using maestro… due to the confusion about what to copy and WHERE is is stored
The Clipboard is not avoided entirely in this case – it's just transparent to the user.
Once Gabe's macro is run the Clipboard contains the URL from the front page in Safari, because the System Clipboard is the only gateway by which paste can take place on macOS.
A potential pitfall in getting the %SafariURL% is that Apple has decided when an app is hidden then the index order of its windows is undefined. (Bad Apple!) – and this means that scripting a given window from a hidden app may produce very unexpected results.
Here's an augmented version of Gabe's macro that compensates if necessary for the window index problem and also purges the clipboard of the pasted URL (restoring what was on it before the paste).