emoyasha Posted August 26, 2008 Share Posted August 26, 2008 (edited) This Records/plays screen activity simple, and the player is slightly(extreamly) glitches xD YOU MUST put both files in the same dir and create a folder named SC todo: save all output screen shot files to a video file recorder: #Include <ScreenCapture.au3> HotKeySet("{ESC}", "_esc") _ScreenCapture_SetJPGQuality(100) $x=0 while 1 _ScreenCapture_Capture("sc\"&$x&".jpg") $x = $x + 1 WEnd func _esc() Exit EndFuncoÝ÷ ÚZÉêè¦Ø¦7o'[Íö§jØjëh×6#Include <File.au3> #Include <Array.au3> GUICreate("Screen Record BETA",700,600,-1,-1,0x40000) $y=0 $FileList=_FileListToArray(@ScriptDir&"/sc") $frames = UBound($FileList) $frames = $frames - 1 $vid = GUICtrlCreatePic("sc/"&$y&".jpg", 0, 0, 700, 600) GUICtrlSetResizing(-1,102) GUISetState() For $y = 0 To $frames sleep(0) GUICtrlSetImage($vid,"sc/" & $y & ".jpg") Next While GUIGetMsg() <> -3 WEnd Edited August 26, 2008 by emoyasha Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Link to comment Share on other sites More sharing options...
spudw2k Posted August 26, 2008 Share Posted August 26, 2008 Pretty cool. I made a background screen capture tool too. I didn't think about making a player though. http://www.autoitscript.com/forum/index.ph...st&p=544577 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
dbzfanatic Posted August 26, 2008 Share Posted August 26, 2008 (edited) Redid your player a bit, it works better now, looks like a real video . #Include <File.au3> #Include <Array.au3> GUICreate("Screen Record BETA",700,600,-1,-1,0x40000) $y=0 $FileList=_FileListToArray(@ScriptDir&"/sc") $frames = UBound($FileList) $frames = $frames - 1 $vid = GUICtrlCreatePic("sc/"&$y&".jpg", 0, 0, 700, 600) GUICtrlSetResizing(-1,102) GUISetState() For $y = 0 To $frames sleep(0) GUICtrlSetImage($vid,"sc/" & $y & ".jpg") Next While GUIGetMsg() <> -3 WEnd Left the sleep in there so people can adjust the speed if they like. Edited August 26, 2008 by dbzfanatic Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
ashley Posted August 26, 2008 Share Posted August 26, 2008 Urm interesting... How would we be able to make all these files into a video? Free icons for your programs Link to comment Share on other sites More sharing options...
emoyasha Posted August 26, 2008 Author Share Posted August 26, 2008 thanks for re-doing my player =] i had the files -4 because i do believe as in php this count the following files 1)thumbs.db 2) 3). 4).. this way it wouldnt play more files than existed, but good work. and as how to add themm all in to a video file... idk i suppose even a GIF would be nice, just we need a way to compress them all in to one animated file. Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Link to comment Share on other sites More sharing options...
ashley Posted August 26, 2008 Share Posted August 26, 2008 I know im looking into i know... Ive been trying to make a screen recorder for ages. Just never thought of taking pictures i tryed to save as a movie file, pit it never worked. Free icons for your programs Link to comment Share on other sites More sharing options...
smashly Posted August 26, 2008 Share Posted August 26, 2008 Here's an *cough* update example that can capture to 1 file and playback at the desired speed, but the size of the capture file is huge. The output from my update is still smaller and better image quality then jpg @ 100% quality. My example would create a 300 mb file for 1 min of capture @ 1024x768 @ 15fps. @ 1024x768: 1 frame capture in jpg @ 100% quality is around 450kb .. 1 frame in tif is around 150kb (24bit, LZW compression) The quality of the tif frame is clear and crisp The quality of the jpg is lossy and discolored Mind you my example @ the above settings chews 80~90% cpu usage on my old single core centrino 1.73Ghz, 512mb laptop. Sorry the codes not optimized, commented or error proof. But if you'd like to play with the code then feel free to optimize it for your needs.expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ScreenCapture.au3> #include <GDIPlus.au3> Global $MultiFrameTif = @ScriptDir & "\TestMultiPage.tif", $FPS = 15, $Seconds = 60 ;1 Minute Global $i = 0, $FC = 0 _MakeMyMultiPageTif($MultiFrameTif, $FPS, $Seconds) ; Start capture to tif file MsgBox(0, "Capture Finished", "Going to display capture now @ Fullscreen") $hGUI = GUICreate("Display Multi-Page tif", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) GUISetState() _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) Do Local $hImage = _GDIPlus_ImageGetFrame($MultiFrameTif, $i) _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0) _GDIPlus_ImageDispose($hImage) Sleep(1000/$FPS) $i += 1 Until $i = $FC _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() Func _MakeMyMultiPageTif($sOutTif, $iFPS = 15, $iSeconds = 60) Local $sCLSID, $tData, $tParams, $hImage0, $hBitmap0, $hBitmapN, $hImageN _GDIPlus_Startup() $sCLSID = _GDIPlus_EncodersGetCLSID("TIF") $tParams = _GDIPlus_ParamInit(3) $tData = DllStructCreate("int Data;int ColorDepth;int Compression") DllStructSetData($tData, "Data", $GDIP_EVTMULTIFRAME) DllStructSetData($tData, "ColorDepth", 24) DllStructSetData($tData, "Compression", $GDIP_EVTCOMPRESSIONLZW) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "Data")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOLORDEPTH, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "ColorDepth")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOMPRESSION, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "Compression")) $hBitmap0 = _ScreenCapture_Capture("", 0, 0, @DesktopWidth, @DesktopHeight) $hImage0 = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap0) _GDIPlus_ImageSaveToFileEx($hImage0, $sOutTif, $sCLSID, DllStructGetPtr($tParams)) $tParams = _GDIPlus_ParamInit(3) DllStructSetData($tData, "Data", $GDIP_EVTFRAMEDIMENSIONPAGE) DllStructSetData($tData, "ColorDepth", 24) DllStructSetData($tData, "Compression", $GDIP_EVTCOMPRESSIONLZW) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "Data")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOLORDEPTH, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "ColorDepth")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOMPRESSION, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "Compression")) Do $hBitmapN = _ScreenCapture_Capture("", 0, 0, @DesktopWidth, @DesktopHeight) $hImageN = _GDIPlus_BitmapCreateFromHBITMAP($hBitmapN) _GDIPlus_ImageSaveAddImage($hImage0, $hImageN, DllStructGetPtr($tParams)) _GDIPlus_ImageDispose($hImageN) _WinAPI_DeleteObject($hBitmapN) $FC += 1 Sleep(1000/$iFPS) Until ($FC = ($iFPS * $iSeconds)) $tParams = _GDIPlus_ParamInit(3) DllStructSetData($tData, "Data", $GDIP_EVTFLUSH) DllStructSetData($tData, "ColorDepth", 24) DllStructSetData($tData, "Compression", $GDIP_EVTCOMPRESSIONLZW) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "Data")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOLORDEPTH, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "ColorDepth")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOMPRESSION, 1, $GDIP_EPTLONG, DllStructGetPtr($tData, "Compression")) _GDIPlus_ImageSaveAdd($hImage0, DllStructGetPtr($tParams)) _GDIPlus_ImageDispose($hImage0) _WinAPI_DeleteObject($hBitmap0) _GDIPlus_Shutdown() EndFunc ;==>_MakeMyMultiPageTif Func _GDIPlus_ImageGetFrame($sFile, $iFrame) Local $hImage, $tDL, $pDimensionIDs, $GFDC, $GFC $hImage = _GDIPlus_ImageLoadFromFile($sFile) $tDL = DllStructCreate($tagGUID) $pDimensionIDs = DllStructGetPtr($tDL) $GFDC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsCount", "ptr", $hImage, "int*", 0) DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsList", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $GFDC[2]) $GFC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameCount", "int", $hImage, "ptr", $pDimensionIDs, "int*", 0) DllCall($ghGDIPDll, "int", "GdipImageSelectActiveFrame", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $iFrame) Return $hImage EndFunc ;==>_GDIPlus_ImageGetFrame Func _GDIPlus_ImageSaveAddImage($hImage, $hImageNew, $pParams) Local $aResult $aResult = DllCall($ghGDIPDll, "int", "GdipSaveAddImage", "hwnd", $hImage, "hwnd", $hImageNew, "ptr", $pParams) If @error Then Return SetError(@error, @extended, False) Return SetError($aResult[0], 0, $aResult[0] = 0) EndFunc ;==>_GDIPlus_ImageSaveAddImage Func _GDIPlus_ImageSaveAdd($hImage, $pParams) Local $aResult $aResult = DllCall($ghGDIPDll, "int", "GdipSaveAdd", "hwnd", $hImage, "ptr", $pParams) If @error Then Return SetError(@error, @extended, False) Return SetError($aResult[0], 0, $aResult[0] = 0) EndFunc ;==>_GDIPlus_ImageSaveAdd Cheers Link to comment Share on other sites More sharing options...
emoyasha Posted August 26, 2008 Author Share Posted August 26, 2008 (edited) when you get the time could you please comment your code, it seems a bit complex at first glance, i will further analyze later. [how is this done?] this is a static image file.. with many immages all stored in one? am i correct, maybe close? Edited August 26, 2008 by emoyasha Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Link to comment Share on other sites More sharing options...
zFrank Posted August 26, 2008 Share Posted August 26, 2008 @ smashly very good work, keep it up! it was superbb [font="Georgia"]GSM Expert[/font] but not AutoIt :DProud to be Admin Of : http://www.gsmhosting.net/visit my Forum... http://www.gsmhosting.net/vbb/index.php$Life = "Happy" If @Error Then $Life = "Risk" 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