myspacee Posted January 15, 2009 Share Posted January 15, 2009 (edited) hello to all,sorry for post here but in general i can't find help. Question is GUI related so i post here.some time ago i made i script that succesfull compare images )using imagemagick.Original idea is load and sctrech different image formats, snapshot them and compare taken shapshots.post image to explain better:to load images i use buldin xp/2003 component "Windows Picture and Fax Viewer" (GDI+)ObjCreate("Preview.Preview.1")My request, is possible to load different images format in a GUI using only Autoit ?(need this because my script works only in xp/2003 environment)thank you for your time,m. Edited January 15, 2009 by myspacee Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 15, 2009 Share Posted January 15, 2009 Look into _gdiplus_imageloadfromfile. I just started playing with it myself. very nice. Giggity Link to comment Share on other sites More sharing options...
myspacee Posted January 15, 2009 Author Share Posted January 15, 2009 nice tip,used before to snapshoot tool made in pastCan suggest how use to put (and see) image in a GUI ?m. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted January 15, 2009 Share Posted January 15, 2009 (edited) Don't know if this will work, I cut a lot of stuff out of it. But it should at least point you in the right direction. #include <GUIConstantsEx.au3> #include <GDIPlus.au3> $pillx = @desktopwidth/2 + 180 $pilly = @desktopheight/2-80 $dr = GUICreate("",@desktopwidth-5,@desktopheight-5,0,0) GUISetState(@SW_SHOW,$dr) _gdiplus_startup() $graphic = _GDIPlus_GraphicsCreateFromHWND($dr) $image = _gdiplus_imageloadfromfile(@scriptdir & "/rb.png") _GDIPlus_GraphicsDrawImageRect($graphic,$image,$pillx,$pilly,300,300) While 1 $msg = GUIGetMsg() Select Case $msg = $gui_event_close _GDIPlus_GraphicsDispose($Graphic) _GDIPlus_ImageDispose($rbpill) _GDIPlus_ShutDown() Exit EndSelect Sleep(10) WEnd Edit: changed the image size from 30 to 300 so you can see it better Edited January 15, 2009 by youknowwho4eva Giggity Link to comment Share on other sites More sharing options...
myspacee Posted January 15, 2009 Author Share Posted January 15, 2009 BIG step in the right direction. Rewriting script to use it. Post here update code. Thank you. m. 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