What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Testing] CViewer (Version 1.0)

[Testing] CViewer (Version 1.0)
Author: Message:
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
O.P. RE: [Testing] CViewer (Version 1.0)
I tried using those APIs but got stuck after getting a handle to the clipboard data. So if your part works, I'm gonna need to write some credits I think :p



Ok, so I fixed up my script with your code to get the text into the PlusWnd, but now I'm struggling with the recall back to the clipboard.

So far I used this site and converted it to a valid script file:

code:
function SetClipBoard(txtString){
        var hGlobalMemory = Interop.Call("kernel32","GlobalAlloc",GHND /*0x0042*/,txtString.length+1);
        var lpGlobalMemory = Interop.Call("kernel32","GlobalLock",hGlobalMemory);
        lpGlobalMemory = Interop.Call("kernel32","lstrcpy",lpGlobalMemory,txtString);
        if(Interop.Call("kernel32","GlobalUnlock",hGlobalMemory)!==0){return false;}
        if(Interop.Call("user32","OpenClipboard",0)===0){return false;}
        Interop.Call("user32","EmptyClipboard");
        var hClipMemory = Interop.Call("user32.dll","SetClipboardData",CF_TEXT /* 1 */,hGlobalMemory);
        if(Interop.Call("user32","CloseClipboard")===0){return false;}
        return true;
}


The only problem is that it only seems to copy the first letter of any string thats passed to it to the clipboard.

Anybody got any ideas? :p
<Eljay> "Problems encountered: shit blew up" :zippy:
02-04-2008 07:33 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Testing] CViewer (Version 1.0) - by Spunky on 02-02-2008 at 08:55 PM
RE: [Testing] CViewer (Version 1.0) - by felipEx on 02-03-2008 at 04:40 PM
RE: [Testing] CViewer (Version 1.0) - by Spunky on 02-04-2008 at 07:33 AM
RE: [Testing] CViewer (Version 1.0) - by felipEx on 02-05-2008 at 10:40 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