Joon Posted April 14, 2006 Posted April 14, 2006 How can I create jpeg or gif from screen print? I guess using MSPaint is oneway. Is there better way of doing this?
seandisanti Posted April 14, 2006 Posted April 14, 2006 How can I create jpeg or gif from screen print? I guess using MSPaint is oneway. Is there better way of doing this?there is a script in scripts and scraps called "Spraypaint" that takes an image from paint. it does it using dll calls though. you can probably get going in the right direction that way.
Developers Jos Posted April 14, 2006 Developers Posted April 14, 2006 How can I create jpeg or gif from screen print? I guess using MSPaint is oneway. Is there better way of doing this?I am using HoverSnap to capture PrintScreen/Alt+Printscreen or Ctrl+PrintScreen (Custom area) and save it to PNG or JPG.. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
BigDod Posted April 14, 2006 Posted April 14, 2006 Go http://www.autoitscript.com/fileman/users/Lazycat/ and you will find a way using a dll by Lazycat. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Valuater Posted April 14, 2006 Posted April 14, 2006 Go http://www.autoitscript.com/fileman/users/Lazycat/ and you will find a way using a dll by Lazycat. i made this with lazycats dll #include "GUIConstants.au3" $CLoc = @TempDir & "\" $CFile = "Dumppic.jpg" $CProgram = $CLoc & "captplugin.dll" FileInstall("C:\Program Files\AutoIt3\Examples\My Stuff\captplugin.dll", $CProgram) Dim $pic _GuiCreater() While 1 sleep(5000) _get_pic() WEnd Func _get_pic() $hPlugin = PluginOpen($CProgram) CaptureScreen($CLoc & $CFile, 85) PluginClose($hPlugin) GUICtrlSetImage( $pic, $CLoc & $CFile) EndFunc Func _GuiCreater() GUICreate("My Pic", 200, 200, 10, 10, $WS_POPUP, $WS_EX_TOPMOST ) $pic = GUICtrlCreatePic($CLoc & $CFile, 0, 0, 200, 200) GUISetState() EndFunc you might get an error with a missing function... just press continue because the function is inside the dll 8)
BigDod Posted April 14, 2006 Posted April 14, 2006 Here is the example from Lazycats site HotKeySet("{F9}", "OnScreenShot") HotKeySet("{ESC}", "Terminate") While 1 Sleep(20) WEnd Func OnScreenShot() If Not FileExists (@scriptdir & "\screenshots") Then DirCreate (@scriptdir & "\screenshots") If Not FileExists(@scriptdir & "\captdll.dll") Then FileInstall( "captdll.dll", @scriptdir & "" ,1) Local $Cwin1 = WinGetHandle(""); gets the handle of the active window Local $Cwin2 = WinGetPos($Cwin1); gets active window dimensions Local $Quality = 85; use -1 to save as BMP or use number between 0 - 100 to save as JPG quality If $Quality = -1 Then Local $SaveAs = ".bmp" Else Local $SaveAs = ".jpg" EndIf Local $CaptureDirectory = @ScriptDir & "\Screenshots\"; directory uses to store screen caps Local $CaptureFile = @YEAR & "-" & @MON & "-" & @MDAY & "_" & @HOUR & @MIN & "-" & @SEC & $SaveAs DllCall(@scriptdir & "\captdll.dll", "int", "CaptureRegion", "str", $CaptureDirectory & $CaptureFile, "int", $Cwin2[0], "int", $Cwin2[1], "int", $Cwin2[2], "int", $Cwin2[3], "int", $Quality) If @error Then MsgBox(262160,"ERROR","The screen was not captured",4) EndFunc Func Terminate() Exit EndFunc And attached is the required dll Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Valuater Posted April 14, 2006 Posted April 14, 2006 my example gets a full screen and lazycats example gets the active window 8)
Joon Posted April 14, 2006 Author Posted April 14, 2006 there is a script in scripts and scraps called "Spraypaint" that takes an image from paint. it does it using dll calls though. you can probably get going in the right direction that way.Spraypaint does nothing about screen print or saving file.
Joon Posted April 14, 2006 Author Posted April 14, 2006 looks like lazycatz dll will do the trick. Thanks everyone. HoverSnap is cool tool. but, just little be too big and no support for commandline.
BigDod Posted April 14, 2006 Posted April 14, 2006 my example gets a full screen and lazycats example gets the active window 8)Sorry posted wrong example DllCall("captdll.dll", "int", "CaptureScreen", "str", "dump_full.jpg", "int", 85) Leaves a jpg file in the script folder called dump_full.jpg Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Joon Posted April 14, 2006 Author Posted April 14, 2006 Sorry posted wrong exampleActually, that is what i needed... Active window capture.
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