Jump to content

Recommended Posts

Posted

I used MouseClickDrag and dragged over a string. then i used Send("^c") to let it click Ctrl + C to put the string in the clipboard. after that, i used $a = ClipGet() but then when i try to msgbox it out. there was nothing. how is this wrong? is it ^c??

Posted

ok, very simple.

"This is a string"

MouseClickDrag("left", "$x1", "$y1", "$x2", "$y2")

Send("^c")

$str = ClipGet()

just want to put the dragged string into the clipboard!

Posted

no, what i mean is, in a website. there are many text. what i want is to start dragging from a position and drag over to the end of the text. Then put that text inside a clipboard so i can paste it into a variable for other purposes! any idea around?

Posted

Your code should be working... What errors does it throw out?

Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite
Posted

it didn't say any error. the problem is there is nothing in the Clipboard after i used Send("^c")!

do you use ctrl + c in ie?

i tried that by using Win32::GUITest (a perl package) SendKeys('^c');

just like your situation, nothing happended!

i also tried keybd_event function in C/C++ to simulate Ctrl + C in ie, but no result.

i don't try to use AutoIt3 to do that, but i think it will be the same.

finally, i have no choice, so i use menu command to enforce ie to copy that string.

send %ec to do that...

Posted

what is %ec? what do you mean? i also tried to use right click and click copy after it dragged over the string., but then there was nothing in the clipboard. i really need this help please!

Posted (edited)

I've had some problems with the clipboard in the past, and this is what I've done:

ClipPut("")
Send("^c")
$clip = ClipGet()
While $cip == ""
    $clip = ClipGet()
WEnd

I know it's longer, but it's usually that the contents just haven't been put into the clipboard by the time AutoIt gets to the next line, and tries to read it.

Edit:Not at all. We all make typos :D

Edited by neogia

[u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...