Jump to content

Ctrl + C?


Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

I've ran into this problem also, and what I did was tried pasting it to the clipboard several times in a row with short sleep statements between. I know there are many people who say this is a bad idea, but it did fix the problem. For those who wish to slam me to the curb......

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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