Jump to content
UBot Underground

How can I store clipboard content into a variable?


Recommended Posts

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.

Link to post
Share on other sites

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?

Link to post
Share on other sites

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.

Link to post
Share on other sites

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?

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 2 weeks later...

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?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...