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
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?