delphi911 0 Posted December 23, 2010 Report Share Posted December 23, 2010 I want to store clipboard content into a variable. Is this possible? if Yes, How can I do that? PS: I have the pro version. Quote Link to post Share on other sites
Guerrilla 19 Posted December 23, 2010 Report Share Posted December 23, 2010 Try setting a variable to $eval and enter this code: returnValue = window.clipboardData.getData('Text')); Quote Link to post Share on other sites
Guerrilla 19 Posted December 23, 2010 Report Share Posted December 23, 2010 This only works in IE7. Im having a look to see if there is a IE8 solution. Quote Link to post Share on other sites
Guerrilla 19 Posted December 23, 2010 Report Share Posted December 23, 2010 Seems like for IE8 you will need to use write to browser command to create a page where you use flash to pass the contents of the clipboard to some javascript code that outputs it to screen then you can scrape it off the screen. There is probably a simpler method but i couldnt see one. Quote Link to post Share on other sites
delphi911 0 Posted December 23, 2010 Author Report Share Posted December 23, 2010 Seems like for IE8 you will need to use run javascript command to a page where you use flash to pass the contents of the clipboard to some javascript code that outputs it to screen then you can scrape it off the screen. There is probably a simpler method but i couldnt see one. I am trying to capture clipboard data that was saved from an application not from ie or any other browser. Is this possible? Quote Link to post Share on other sites
Guerrilla 19 Posted December 23, 2010 Report Share Posted December 23, 2010 Ubot uses an embedded IE control, this is why I am referring to IE. Yes its possible using method in my last post (I edited slightly as I said run javascript instead of write to browser). If you have IE7 installed on your system then my original code will work. Quote Link to post Share on other sites
delphi911 0 Posted December 23, 2010 Author Report Share Posted December 23, 2010 Seems like for IE8 you will need to use write to browser command to create a page where you use flash to pass the contents of the clipboard to some javascript code that outputs it to screen then you can scrape it off the screen. There is probably a simpler method but i couldnt see one. My version of ie is 8. So how can I implement this code you suggested? Quote Link to post Share on other sites
Guerrilla 19 Posted December 23, 2010 Report Share Posted December 23, 2010 Probably easiest to hire someone from odesk to do it for you unless you know flash and javascript yourself. Tell them to create a function that accesses the clipboard and retuns the contents as a retun value. You can then modify that script slightly to get it to work inside ubot. You do that by stipping off the outer function declaration and changing the return value line. So you will get something like: function() { // lots of code and stuff here return returnValue; } And you will change that to be like: // lots of code and stuff here ubotReturn = returnValue; Then just drop that code inside an $eval when setting a variable and you should hold the clipboard contents in the variable. Quote Link to post Share on other sites
bayorgs 0 Posted January 4, 2011 Report Share Posted January 4, 2011 Wow, I came looking for this information as well. I don't need to make the stuff in the clipboard a variable (though that would be my preferred solution), just need to run a save to file with the contents of the clipboard. I figured there would be an easy solution ... but Guerrilla's solution is a bit over my head - not his fault, I'm not much of a coder. Beyond hitting up odesk, anyone see a simpler solution? Quote Link to post Share on other sites
UBotBuddy 331 Posted January 4, 2011 Report Share Posted January 4, 2011 Here is what I have done in regards to the Copy/Paste attempts. http://ubotstudio.com/forum/index.php?/topic/5798-the-input-commands-devpro-by-jonhb/ Quote Link to post Share on other sites
bayorgs 0 Posted January 4, 2011 Report Share Posted January 4, 2011 Here is what I have done in regards to the Copy/Paste attempts. http://ubotstudio.com/forum/index.php?/topic/5798-the-input-commands-devpro-by-jonhb/ Thanks for that! I just used your write to browser code and then scraped it into a variable. worked like a charm! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.