This seems duable to but wanted to run it by people. I want to stop using PasteBot and just build in using the HTML windows that @DanThomas posted to see a small window of content in the clipboard and then copy sequentially once I open/run the pallet/macro and then use command C to add to the window with a number next to each thing copied.
When I press command+v as long as the window is open then I will paste in order that the items were copied so the first item coped would be pasted and it would disaper from the window and the next item would then be shown.
Something like this is what I am thinking.
Step 1: Create the Toggle Macro for the Sequential Clipboard
- Create a New Macro in Keyboard Maestro, naming it something like “Toggle Sequential Clipboard.”
- Set the Trigger: Assign a hotkey trigger (e.g.,
⌘ + Shift + C
) to toggle the clipboard display window on and off.
Step 2: Set Up a Clipboard Array Variable and Initialize It
- Add an Action to Check if the Clipboard Window is Open:
- Use an “If Then Else” action at the start of the macro.
- Check if a variable, say
ClipboardWindowOpen
, exists and is set to1
(indicating that the window is open).
- If the Window is Open:
- Add actions to close the HTML clipboard window and clear the clipboard array if needed.
- Set
ClipboardWindowOpen
to0
to indicate the window is now closed.
- If the Window is Not Open:
- Set
ClipboardWindowOpen
to1
to indicate the window is open. - Initialize or clear a variable called
ClipboardArray
to hold the clipboard contents. - Show the HTML window that will dynamically update with each new clipboard item.
Step 3: Create a Macro to Capture Each New Clipboard Item
- Set Up the Clipboard Listener Macro:
- Create a new macro, triggered by
Command + C
, to capture each new clipboard item. - This macro should:
- Get the current clipboard contents.
- Add the contents to the
ClipboardArray
variable (either appending to a comma-separated list or as JSON). - Refresh the HTML display window to reflect the updated clipboard list.
- Add Condition to Only Trigger When the Window is Open:
- To make sure this macro only activates when the sequential clipboard is active, add a condition to check if
ClipboardWindowOpen
is set to1
.
Step 4: Create the HTML Clipboard Display Window
- Customize an HTML Window:
- Use a “Custom HTML Prompt” action to create a small HTML window that displays the clipboard items in sequence.
- Format the HTML window with JavaScript to update dynamically whenever the
ClipboardArray
variable is modified. - Each item should appear with a number in the order it was copied.
- Auto-Refresh the Window:
- Use JavaScript in the HTML to refresh the display every time
ClipboardArray
updates.
Step 5: Create the Sequential Paste Macro
- Create the Paste Macro (
Command + V
):
- This macro should paste the first item in
ClipboardArray
, remove it from the list, and refresh the HTML window. - If there are no items in the array, the macro should show a message like “No items to paste.”
Putting It All Together
- Toggle Macro (
⌘ + Shift + C
): Starts or stops the sequential clipboard, opening/closing the HTML window. - Copy Macro (
Command + C
): Captures each new clipboard item, adds it toClipboardArray
, and updates the HTML display. - Paste Macro (
Command + V
): Pastes the first item in the list, removes it from theClipboardArray
, and updates the display window.
This setup will allow you to activate a sequential clipboard when needed, with a growing list shown in a dynamic HTML window. Pressing the toggle key will close everything, ready to start fresh next time.
What I don't know is reading and trying to understand Clipboard Flavors (which seems a bit vague from the Wiki and what I can find) it might not keep things that would properly paste back into things like MS Excel, or Keyboard Maestro actions copied etc. I mostly want it to be text but would like to make it more bullet proof as I work on this.
I don't know why it does this but the extra six came when I selected all and deleted everything. I guess that puts things into the cue for the last copied item for some reason in PasteBot. Anyway hopefully the GIF gives you a clear idea of what I am trying to do with Keyboard Maestro. That way I don't have to install as many applications to get the features I want and can also exclude such things from some applications like Keyboard Maestro allows you to do.