I’ve tried many ways to avoid using GetClipboardText(). But cannot find a solution.
I did a ExeOutput procedure to select the data, then called a JavaScript function to get the data from the clipboard via
var selection = window.getSelection().toString();
On localhost, all works fine and the clipboard data has its CRLF values and the entire clipboard.
The next thing in the JavaScript code was to call the email client. But no matter what I do, all the following fail:
window.location.href = ‘mailto:[email protected]’;
window.location.assign = ‘mailto:[email protected]’;
window.event.returnValue = false;
window.location.assign = ‘mailto:[email protected]’;
setTimeout(function(){document.location.href = ‘mailto:[email protected]’},500);
window.location.assign = ‘mailto:[email protected]’;
return false;
window.location = ‘mailto:[email protected]’;
window.location = ‘http://www.google.com/’;
window.location.href = ‘mailto:[email protected]’;
Then I saw this in a ExeOutput post: “With Chromium, we don’t have the same ability to manage window properties from code.” So I figure I cannot use JavaScript to call mailto. I will, instead, call an ExeOutput procedure, sending the collected clipboard and have it do the email client call. It worked, except one problem…
var selection = window.getSelection().toString();
when compiled and executed under ExeOutput, it only collects about 30 chars from the clipboard.
I’m in a quandary. GetClipboardText() removes CRLF, and under ExeOutput window.getSelection().toString(); fails to get all the clipboard data.
What to do???