Hi Jon
From what I understood (correct me if I'm wrong), alexut wants it so that the first time he pastes, the first word is pasted, the second time, the second word is pasted, etc.
eg. "Hello, how are you?"
Paste 1: "Hello,"
Paste 2: "how"
Paste 3: "are"
Paste 4: "you?"
I guess the pseudo code for a macro would be something like:
Get the text off the clipboard. (eg. "Hello, how are you?")
Split the text apart (using RegEx or whatever). (eg. "Hello," "how" "are" "you?")
Get the first result, and paste it to the current application.(eg. "Hello,")
Remove the first result from the original text and save that as the new clipboard text (eg. "how are you?")
So when you run the macro a second time it will return the next word, and so on.
Alternatively, the result that you return could be added to the end of the clipboard text (eg. "how" "are" "you?" "Hello,")
so that as you paste each word, it loops around.
I haven't had a chance to play around with the macros too much yet. Obviously the new clipboard value is the return value of the ProcessText function, but I'm not sure if you can paste directly from the macro, or if the value has to be returned to the clipboard first before it can be pasted.
PS. As this is a macro, you could use any value for the delimiter (not just the space that I have used in my examples), so you could break the text apart at line breaks or tabs, or using RegEx you could break it apart using things like HTML list items, etc, or even based on length (eg. three equal parts).
Cheers,
- Stephan