Trying to copy some text to the clipboard - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Trying to copy some text to the clipboard (/showthread.php?tid=62754) Trying to copy some text to the clipboard by segosa on 07-07-2006 at 04:27 PM
I'm trying to make a function that will copy text to the clipboard. I'm using the Windows API. This is the code I have so far: code: I'm obviously going to make it set_clipboard_text(str), the way the function is now is just while I test it and try and get it to work. I'm basing it off some C++ code that I wrote a while ago: code: The function as it is now works fine, there are no errors. And text is copied to the clipboard. The problem is, this text consists of several spaces and random characters. I have a feeling it's a unicode problem but I can't see where I've gone wrong in my function, so does anyone have any ideas? RE: Trying to copy some text to the clipboard by J-Thread on 07-07-2006 at 10:48 PM
How about using the Clipboard object? (following code copied directly from the MSDN without testing): code: RE: Trying to copy some text to the clipboard by RaceProUK on 07-07-2006 at 10:55 PM That looks a little .NET to me... will it actually work? RE: Trying to copy some text to the clipboard by J-Thread on 07-07-2006 at 11:00 PM I noticed that... But this page is really talking about JScript... It seems like this is different from the language we are using for scripts... RE: Trying to copy some text to the clipboard by Dhaya on 07-07-2006 at 11:28 PM I tested using this class which is inherited from System.Windows.Forms, and i didn't found a way to make it work :/ RE: Trying to copy some text to the clipboard by Eljay on 07-08-2006 at 07:43 AM
quote: thats because its JScript.net RE: Trying to copy some text to the clipboard by J-Thread on 07-08-2006 at 11:02 AM
Right... I think I get it now... RE: Trying to copy some text to the clipboard by andrey on 07-12-2006 at 02:26 PM
Solution for copying text to/from the clipboard: |