Sign in to follow this  
Followers 0
nAutoIT

Send("^c") and _ClipBoard_GetData()

7 posts in this topic

#Include <Clipboard.au3>

Mouseclick("left", 100, 200, 1)

Send("^c")

$chatraw = _ClipBoard_GetData($CF_TEXT)

I try to extract Chat out of a Chatwindow. Single Letters of this Chat cant be highlighted (also Au3Info doesnt get any Information from this Window), but you can click on a line of Text and use ctrl+c to get it into the ClipBoard and paste it in a Textfile, for example. If i run the above Script, it stops and i get a Windows Error Message.

The copied text is something like this(Without the "): "[@A]4:25 PM [b"]Brand[/b"]: test"

Not sure if my Explanation was clear, so here is what i want the Script to do:

1.) Click somewhere on the screen.

2.) Hit ctrl+c

3.) Paste into a string/text-file/msgbox

If i do this manually, it works, but i cant get AutoIt to do it.

Share this post


Link to post
Share on other sites



Thanks for the fast answer, JohnOne.

I just tried this:

#Include <Clipboard.au3>

MouseClickDrag("left", 850, 560, 865, 560)

Send("^c")

$chatraw = _ClipBoard_GetData($CF_TEXT)

MsgBox(1, "Chat", $chatraw)

Still the same Windows Error Message.

Share this post


Link to post
Share on other sites

Thanks a lot, that did the trick.

So i just used the wrong function, did i? Tested a little more and every time i use _ClipBoard_GetData() the script crashes. Took a look at the Clipboard.au3, but i dont know anything about C++, DllStruct calls and memory allocation. Did i use _Clipboard_GetData() wrong, or is there a problem with my Computer?

Share this post


Link to post
Share on other sites

I tend to use ClipGet() instead of _Clipboard_GetData() since it doesn't require Clipboard.au3.

MouseClickDrag("left", 850, 560, 865, 560)
Send("^c")
Sleep(100)
$Clip = ClipGet()
MsgBox(1, "Chat", $Clip)
Send($Clip)

Share this post


Link to post
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
Sign in to follow this  
Followers 0