4Bidden Posted January 21, 2011 Share Posted January 21, 2011 (edited) Hi everybody This is my first foray into scripting issues. Issue:I want copy from clipboard and place it in my GUI Application Form,My script will be continuously copying and pasting into the clipboard, so I wanna continuously be feeding the lastcopied Clipboard image into my Application form Any Ideas on how to do this, I would be grateful for any help or direction on how to do this..Thanks Edited January 21, 2011 by 4Bidden Link to comment Share on other sites More sharing options...
JohnOne Posted January 21, 2011 Share Posted January 21, 2011 Put "_Clip" into the helpfile index tab to bring up the _ClipBoard_ functions, read about them, study and test the examples provided. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
4Bidden Posted January 21, 2011 Author Share Posted January 21, 2011 Put "_Clip" into the helpfile index tab to bring up the _ClipBoard_ functions, read about them, study and test the examples provided.I have done the above stuff all I can do is put text into a Msgbox, I wanna work with Images ......Any Ideas Plz Help Link to comment Share on other sites More sharing options...
JohnOne Posted January 21, 2011 Share Posted January 21, 2011 Ok, have you attempted absolutely anything with regards what you need? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JoHanatCent Posted January 21, 2011 Share Posted January 21, 2011 Put "_Clip" into the helpfile index tab to bring up the _ClipBoard_ functions, read about them, study and test the examples provided.Then you also want to study:_ScreenCapture_Capture Link to comment Share on other sites More sharing options...
4Bidden Posted January 22, 2011 Author Share Posted January 22, 2011 Then you also want to study:_ScreenCapture_Capturehey thanks for this.. This looks like this could work....Issue is how will image show up on the GUI Im building or a Msgbox, Only text seems to show up on the MsgboxAny help would be greatly appreciated Link to comment Share on other sites More sharing options...
UEZ Posted January 22, 2011 Share Posted January 22, 2011 Here one method: expandcollapse popup;coded by UEZ 2011 #include <Clipboard.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $msgb = MsgBox(4, "Clipboard to GUI", "Ready to copy an image from clipboard to GUI?") If $msgb <> 6 Then Exit If Not _ClipBoard_Open(0) Then Exit _WinAPI_ShowError ("_ClipBoard_Open failed") $hMemory = _ClipBoard_GetDataEx($CF_BITMAP) If $hMemory = 0 Then Exit _WinAPI_ShowError ("_ClipBoard_GetDataEx failed") _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hMemory) If $hBitmap = 0 Then Exit _WinAPI_ShowError ("_GDIPlus_BitmapCreateFromHBITMAP failed") $iWidth = _GDIPlus_ImageGetWidth($hBitmap) $iHeight = _GDIPlus_ImageGetHeight($hBitmap) $hGUI = GUICreate("Show Image from Clipboard", $iWidth, $iHeight, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) GUISetState(@SW_SHOW, $hGUI) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _ClipBoard_Close() _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() GUIDelete($hGUI) ExitLoop EndSwitch WEnd Copy an image to the clipboard and start script. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
4Bidden Posted January 22, 2011 Author Share Posted January 22, 2011 Here one method: expandcollapse popup;coded by UEZ 2011 #include <Clipboard.au3> #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $msgb = MsgBox(4, "Clipboard to GUI", "Ready to copy an image from clipboard to GUI?") If $msgb <> 6 Then Exit If Not _ClipBoard_Open(0) Then Exit _WinAPI_ShowError ("_ClipBoard_Open failed") $hMemory = _ClipBoard_GetDataEx($CF_BITMAP) If $hMemory = 0 Then Exit _WinAPI_ShowError ("_ClipBoard_GetDataEx failed") _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hMemory) If $hBitmap = 0 Then Exit _WinAPI_ShowError ("_GDIPlus_BitmapCreateFromHBITMAP failed") $iWidth = _GDIPlus_ImageGetWidth($hBitmap) $iHeight = _GDIPlus_ImageGetHeight($hBitmap) $hGUI = GUICreate("Show Image from Clipboard", $iWidth, $iHeight, -1, -1, $WS_POPUP, $WS_EX_TOPMOST) GUISetState(@SW_SHOW, $hGUI) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 0, 0) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _ClipBoard_Close() _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() GUIDelete($hGUI) ExitLoop EndSwitch WEnd Copy an image to the clipboard and start script. Br, UEZ YOU THE MAN !!!!!!!!!!!!!! Thanks a lot just curious how long have you been working with Auto-it Link to comment Share on other sites More sharing options...
UEZ Posted January 22, 2011 Share Posted January 22, 2011 Since mid 2007 I started with coding in general. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
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