What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » scripts and the clipboard

scripts and the clipboard
Author: Message:
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: scripts and the clipboard
The CF_TEXT and CF_OEMTEXT are constants, don't use them as strings:

code:
var CF_TEXT = 516; // check these
var CF_OEMTEXT = 7;

if (Interop.Call("User32", "OpenClipboard", 0))
{
if (Interop.Call("User32", "IsClipboardFormatAvailable", CF_TEXT | CF_OEMTEXT))
{
var hClipboardData = Interop.Call("User32", "GetClipboardData", CF_TEXT);
var pchData = Interop.Call("Kernel32", "GlobalLock", hClipboardData);
var strFromClipboard = pchData;
Debug.Trace(strFromClipboard);
Interop.Call("Kernel32", "GlobalUnlock", hClipboardData);
}
else
{
Debug.Trace("There is no text data on the Clipboard.");
}
Interop.Call("User32", "CloseClipboard");
}


Not tested, but should work better;)
07-11-2006 07:13 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
scripts and the clipboard - by andrey on 07-11-2006 at 05:29 AM
RE: scripts and the clipboard - by J-Thread on 07-11-2006 at 07:13 AM
RE: scripts and the clipboard - by segosa on 07-11-2006 at 08:21 AM
RE: RE: scripts and the clipboard - by andrey on 07-11-2006 at 08:01 PM
RE: scripts and the clipboard - by Ezra on 07-11-2006 at 08:16 PM
RE: scripts and the clipboard - by deAd on 07-11-2006 at 08:41 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On