Thanks for the follow-up Jon.
To give you an idea of why I want to do this... I was hoping to be able to use the macros as a sort of smart snippet library, so when I press the HotKey for a given macro, the current clipboard value is temporarily saved, then a different string is created and pasted to the currently focused window, then the temporarily saved original string is put back on the clipboard. I do a lot of HTML editing in Notepad (sometimes nothing else is installed on the PCs that I use), and it would be good to be able to insert HTML snippets, so if I copy a string like "head" to the clipboard and run a macro, it will paste a framework of all the HTML elements that I need in the head of a document (head, title, meta, style, etc), then put the original string "head" back on the clipboard.
From what I understand of what you are saying, my example macro should be doing to following:
[list type=decimal]
I press (and hold) the HotKey (eg. Ctrl + Alt + Q)
Nothing happens until I release the keys
I release the HotKeys
The macro starts
The 'text' value is set to "1" (in this example macro) - effectively ignoring whatever was on the clipboard before I started the macro
The MacroAPI.PasteText function is called
The string "2" (in this example macro) is pasted to the currently focused window
The string "2" (in this example macro) is saved to the clipboard
The ProcessText function returns the value of 'text' (which, in this example macro, should return "1")
The return value of the ProcessText function is saved to the clipboard (which, in this example macro, should be "1")
[/ul]
So at the end of this, the macro should have pasted the string "2" to the currently focused window, and then the string "1" should be saved to to the clipboard.
If I used the standard paste command after this, it should just paste whatever is left on the clipboard after running the macro (in this example, it should be "1").
But, what is happening is that the string "1" (not "2") is being pasted to the focused window, and the same string "1" is being saved to the clipboard. So it seems to be ignoring whatever string I pass to the MacroAPI.PasteText function.
Or am I missing something here...?
I'm just trying to get my head around this... thanks for any further insight that you can give me.
Cheers,
- Stephan