taylansan Posted June 9, 2007 Posted June 9, 2007 (edited) when u copy some text or w/e it is saved in clipboard. ex: i copy "dsadsa" and saved in clipboard, the below program shows this and checks if u copy smt in every 0.25secs while 1 $commands = ClipGet() Tooltip($commands,2,2 ) sleep(250) wend now i wonder if i copy an image using printscreen. copied image is also saved in clipboard (i think). how can i read the values of the image which is saved in clipboard? tnx for answering Edited June 9, 2007 by altamir TY.
poisonkiller Posted June 9, 2007 Posted June 9, 2007 Short answer-you can't. But if you really try, you MAY be able to get some text by using OCR.
MHz Posted June 9, 2007 Posted June 9, 2007 (edited) Look here at Autoit3Lib by PaulIA.Edit:That is for grabbing a capture and saving it. Read values from a image in the clipboard is illogical to imagine. Edited June 9, 2007 by MHz
PaulIA Posted June 9, 2007 Posted June 9, 2007 (edited) Using Auto3Lib to capture screen, paste to clipboard, open Paint, paste: ; Capture to clipboard $hBMP = _ScreenCap_Capture("") _Clip_SetData($hBMP, $CF_BITMAP) ; Run paint and paste the image Run("MSPaint.exe") WinWaitActive("untitled - Paint") Send("!eP") Edited June 9, 2007 by PaulIA Auto3Lib: A library of over 1200 functions for AutoIt
payne Posted June 22, 2007 Posted June 22, 2007 when u copy some text or w/e it is saved in clipboard. ex: i copy "dsadsa" and saved in clipboard, the below program shows this and checks if u copy smt in every 0.25secs while 1 $commands = ClipGet() Tooltip($commands,2,2 ) sleep(250)Ù[ now i wonder if i copy an image using printscreen. copied image is also saved in clipboard (i think). how can i read the values of the image which is saved in clipboard? tnx for answering I also tried to find solution with this issue, but failed. I found one command line small utility can help on this way. it call "ClipboardToImage", you could seach it on google. Payne
PaulIA Posted June 22, 2007 Posted June 22, 2007 I also tried to find solution with this issue, but failed.I found one command line small utility can help on this way.it call "ClipboardToImage", you could seach it on google.PayneAs the post right above yours shows, you can use Auto3Lib to put images on the clipboard. You can also read an image from the clipboard and save it to disk. I believe that is what the OP was asking for and it's all done in AutoIt code. Auto3Lib: A library of over 1200 functions for AutoIt
_Kurt Posted June 22, 2007 Posted June 22, 2007 I know that Auto3Lib is able to do that, but incase you're looking for something else, read this thread:http://msdn2.microsoft.com/en-us/library/y...efc(VS.80).aspxKurt Awaiting Diablo III..
PaulIA Posted June 22, 2007 Posted June 22, 2007 I know that Auto3Lib is able to do that, but incase you're looking for something else, read this thread:http://msdn2.microsoft.com/en-us/library/y...efc(VS.80).aspxKurtVB? Ugh! I think if you peeked inside of VB you'd see that it's making the same API call to the clipboard that Auto3Lib makes. To each his own though. Auto3Lib: A library of over 1200 functions for AutoIt
JohnBailey Posted November 7, 2007 Posted November 7, 2007 What am I doing Wrong? (why won't it paste image) #include <A3LClipboard.au3> Send('!{PRINTSCREEN}') Sleep(1000*2) $lastclip = ClipGet() Local $clipType If @error=2 Then $clipType = 'image' $lastclip =_Clip_GetData($CF_BITMAP) ElseIf @error > 2 Then ConsoleWrite('Msg: '& 'clipget unknown handling of errorcode '& @error & @CRLF) $clipType = 'unknown' Else $clipType = 'text' EndIf If $lastclip = '' Then ConsoleWrite('Lastclip Var: '& 'nothing in lastclip var' & @CRLF) Run('"C:\Program Files\Windows NT\Accessories\wordpad.exe"',"C:\Program Files\Windows NT\Accessories\") ClipPut('Test Msg') $WinTitle='Document - WordPad' WinWaitActive($WinTitle) ConsoleWrite('ClipType: '& $clipType &@CRLF) If $clipType = 'text' Then ClipPut($lastclip) Else _Clip_SetData($lastclip, $CF_BITMAP) EndIf Sleep(1000*3) ConsoleWrite('Clipboard: '&$lastclip &'-:' & @CRLF) If $lastclip = '' Then ConsoleWrite('Msg: '& 'nothing in lastclip var' & @CRLF) ControlSend($WinTitle,'','RICHEDIT50W1','^v') A decision is a powerful thing
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now