Copy Clipboard, how to?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Copy Clipboard, how to?
I am trying to copy what ever is on the clipboard (mac) so that I can do a search and replace on it (I want to find any HTML and replace it with BBCode alternatives).
This is my first try, anyone have any ideas that could help me?
This is my first try, anyone have any ideas that could help me?
Re: Copy Clipboard, how to?
for example
Code: Select all
put the clipboarddata["text"] into myVar
replace "<" with "[" in myVar
set the clipboarddata["text" to myVar
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: Copy Clipboard, how to?
Thank you for the fast response BvG, as I said, I am a complete n00b at RunRev programming, in your example, on the third line, there is no closing bracket around the 'text' variable, it's not throwing any errors, so I am assuming it is correct?
If you could show me how to display the resulting text, it might make things alot clearer for me.
If you could show me how to display the resulting text, it might make things alot clearer for me.
Re: Copy Clipboard, how to?
Wait a second, I put the code into a mouse handler on MouseUp, and then checked the contents of the clipboard, and it really worked, it can't be this easy, can it?
Re: Copy Clipboard, how to?
Try the dictionary for these commands and terms.
Also: Yes it is that easy.
Also: Yes it is that easy.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: Copy Clipboard, how to?
It can and it is, get used to itWetWorx wrote:Wait a second, I put the code into a mouse handler on MouseUp, and then checked the contents of the clipboard, and it really worked, it can't be this easy, can it?

Best
Klaus
Re: Copy Clipboard, how to?
To be correct, the closing bracket in the lineWetWorx wrote:Thank you for the fast response BvG, as I said, I am a complete n00b at RunRev programming, in your example, on the third line, there is no closing bracket around the 'text' variable, it's not throwing any errors, so I am assuming it is correct?
If you could show me how to display the resulting text, it might make things alot clearer for me.
Code: Select all
set the clipboarddata["text" to myVar
Corrected:
Code: Select all
set the clipboarddata["text"] to myVar
Re: Copy Clipboard, how to?
I added it and am moving along in my project with both of your help, thank you.
Re: Copy Clipboard, how to?
Oops, yeah definitely a typo, sorry for that 

Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: Copy Clipboard, how to?
BvG, nothing at all to apologize for, you taught me something, I thank you for that.