pastl Posted January 16, 2006 Posted January 16, 2006 Hello erverybody, I found this in the web, but i don't know the language. (Maby C, C++) could anyone of yo help me to translate this into an AutoIt Script: expandcollapse popup'by Alyce Watson 'This little demo shows how to send a bitmap to the clipboard. 'It also shows how to grab a bitmap from the clipboard and 'display it in our Liberty BASIC program. nomainwin WindowWidth=340:WindowHeight=480 graphicbox #1.g, 10,10,300,300 statictext #1.s, "",10,320,600,50 open "Clipboard Demo" for window as #1 print #1, "trapclose [quit]" h=hwnd(#1) filedialog "Open","*.bmp",bmpfile$ if bmpfile$="" then [quit] loadbmp "forclip",bmpfile$ hBitmap=hbmp("forclip")'get bmp handle 'open clipboard: calldll #user32, "OpenClipboard",h as long, result as long 'put bmp data on clipboard: calldll #user32, "SetClipboardData",_CF_BITMAP as long,_ hBitmap as long, rethandle as long 'see if bmp data is on clipboard calldll #user32, "GetClipboardData",_CF_BITMAP as long,_ hBmp as long 'if bmpdata is on clipboard, load the bmp and draw it if hBmp<>0 then loadbmp "demo",hBmp print #1.g, "down;fill lightgray;drawbmp demo 0 0;flush" end if calldll #user32, "CloseClipboard", result as void msg$="Return for CF_BITMAP ";hBmp print #1.s, msg$ wait [quit] if hBmp<>0 then unloadbmp "demo" close #1:end I want to copy Pics to cilpboard, but i don't know how to handle this in AutoIt using DllCall. Thank's for your Help. Greatings pastl
Valuater Posted January 16, 2006 Posted January 16, 2006 what do you want to do with the pic AFTER you copy it to the clipboard?? 8)
pastl Posted January 16, 2006 Author Posted January 16, 2006 Hello Valuater, after saving in to clipboard, i just want it back , for example with "paste" from the Contexmenu. P.s. sorry for my english, cause i'm form austria. Thank's for your help. pastl
pastl Posted January 16, 2006 Author Posted January 16, 2006 Hello Larry, thank's a lot for your hepl.
pastl Posted January 17, 2006 Author Posted January 17, 2006 Thank's Larry, just one mor Question: Why can i just "paste" the Pics from clipboard to an application (like Wordpad,...) and not to a different Folder, Drive,...? Greatings pastl
CyberSlug Posted January 17, 2006 Posted January 17, 2006 Hello erverybody,I found this in the web, but i don't know the language. (Maby C, C++)If I had to guess, I'd say the language is Liberty BASIC I'm glad Larry was able to help Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
CyberSlug Posted January 17, 2006 Posted January 17, 2006 Thank's Larry,just one mor Question:Why can i just "paste" the Pics from clipboard to an application (like Wordpad,...) and not to a different Folder, Drive,...?Greatings pastlThe picture would need a file name. Windows could theoretically generate one--if I recall correctly, it was possible to save clipboard scraps *.shd files or something--but Windows doesn't do that for pictures....When you copy and paste a file, the clipboard contains a reference to that file rather than the contents of that file.... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
pastl Posted January 17, 2006 Author Posted January 17, 2006 Thank's for your answer CyberSlug. And yes, it was Liberty Basic, soory for that. :">
Cedric7659 Posted February 7, 2006 Posted February 7, 2006 yeah! i was seeking about it! thanks! there is anyway to put in a jpg file?
jaenster Posted February 7, 2006 Posted February 7, 2006 Do you make a progam that make screenshots ? ^^ -jaenster
Cedric7659 Posted February 7, 2006 Posted February 7, 2006 Do you make a progam that make screenshots ? ^^Yes i do! :">
strate Posted February 7, 2006 Posted February 7, 2006 Yes i do! :">Have you looked at lazycats capture function yet? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
Cedric7659 Posted February 7, 2006 Posted February 7, 2006 Have you looked at lazycats capture function yet?Yes, and i don't see how to put the captured jpg file into clipboard.
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