Mast3rpyr0 Posted July 2, 2007 Share Posted July 2, 2007 (edited) I made this for someone on RentACoder but they declined my bid so guess ill post it here. PrnScr will take a screenshot and save it in C:\Program Files\ScreenCap with the date and time as the name. It will then add the complete path to the image to the clipboard. Esc will close the program. #Include <A3LClipBoard.au3> #Include <A3LScreenCap.au3> HotKeySet("{PRINTSCREEN}", "PicFunc") HotKeySet("{ESC}", "ExitFunc") SplashTextOn("ScreenCap", "Starting ScreenCap...", 200, 50) Sleep(1000) SplashOff() While 1 WEnd Func PicFunc() _Clip_Empty() $sFileName = @ProgramFilesDir & "\ScreenCap\Cap_" & @MON & @MDAY & @HOUR & @MIN & @SEC & ".bmp" _ScreenCap_Capture($sFileName) _Clip_SetData($sFileName) Sleep(100) EndFunc Func ExitFunc() Exit EndFunc Edited July 3, 2007 by Mast3rpyr0 My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
lod3n Posted July 2, 2007 Share Posted July 2, 2007 What do you think of RentACoder? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted July 2, 2007 Author Share Posted July 2, 2007 Pretty easy money unless you find picky buyers. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
idusy Posted July 2, 2007 Share Posted July 2, 2007 #Include <GUIConstants.au3> ??? Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted July 2, 2007 Author Share Posted July 2, 2007 probably not needed but i put it in all my programs. or do you not know what tha means? My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
GEOSoft Posted July 2, 2007 Share Posted July 2, 2007 probably not needed but i put it in all my programs. or do you not know what tha means?Definitly not needed here gecause you don't have a GUI therefore you have no GUI Constants to include. I never include that file (or any of the constants files) anyway. Just use the value of the constant. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
idusy Posted July 3, 2007 Share Posted July 3, 2007 Definitly not needed here gecause you don't have a GUI therefore you have no GUI Constants to include. I never include that file (or any of the constants files) anyway. Just use the value of the constant.I never do any #includes unless I use like 3 UDFs/Variables from them. Link to comment Share on other sites More sharing options...
SalazarCheats Posted July 3, 2007 Share Posted July 3, 2007 i get his error... Please help... Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted July 4, 2007 Author Share Posted July 4, 2007 You have the A3Lib installed? If not its the first sticky post in Example scripts. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
SalazarCheats Posted July 4, 2007 Share Posted July 4, 2007 (edited) You have the A3Lib installed?If not its the first sticky post in Example scripts.yes i do... but ill reinstall now just to dubble checkChecked it still not working... Edited July 4, 2007 by SalazarCheats Ok im 14 with a spelling age of a 9 year old... that explanes all my spelling mistakes Link to comment Share on other sites More sharing options...
testingtest Posted July 6, 2007 Share Posted July 6, 2007 I get this error Return $aResult[0] <> 0 Return $aResult^ ERROR Link to comment Share on other sites More sharing options...
Generator Posted July 6, 2007 Share Posted July 6, 2007 I get this error Return $aResult[0] <> 0 Return $aResult^ ERRORTry with latest version of AutoIt, maybe that's the problem, or his version was an older version, because dllcall was different i noticed. Anyways check out the 1 in my sign too. Link to comment Share on other sites More sharing options...
tonlo Posted July 7, 2007 Share Posted July 7, 2007 Mast3rpyr0 you code so cool, but it output .bmp, i wanna change output file to .jpg so it tat only change 1 line $sFileName = @ProgramFilesDir & "\ScreenCap\Cap_" & @MON & @MDAY & @HOUR & @MIN & @SEC & ".bmp"but when i press prtsc key, nothin happen. Help me plz, how to output .jpg ??? (Sori my ENG so bad ) Link to comment Share on other sites More sharing options...
AutoItKing Posted July 7, 2007 Share Posted July 7, 2007 You don't need the ExitFunc. By default AutoIt exits when Esc is pressed. http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
RazerM Posted July 7, 2007 Share Posted July 7, 2007 AutoIt does not exit by default if Escape is pressed. Not bad program, I think you should put in a DirCreate to create the folder (I had to create the folder manually for script to work). Also, don't hotkeyset the print screen key until after the splash has finished, that way there is no screen capture during startup. My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop. Link to comment Share on other sites More sharing options...
tonlo Posted July 16, 2007 Share Posted July 16, 2007 (edited) i can't output *.jpg, plz help!!!!!in A3LScreenCap.au3 :Func _ScreenCap_SaveImage($sFileName, $hBitmap, $fFreeBmp=True) ...... ...... Switch $sExt case "BMP" $iX = _GDIP_ImageGetWidth ($hImage) $iY = _GDIP_ImageGetHeight($hImage) $hClone = _GDIP_BitmapCloneArea($hImage, 0, 0, $iX, $iY, $giA3LBMPFormat) _GDIP_ImageDispose($hImage) $hImage = $hClone case "JPG", "JPEG" $tParams = _GDIP_ParamInit(1) $tData = DllStructCreate("int Quality") DllStructSetData($tData, "Quality", $giA3LJPGQuality) _GDIP_ParamAdd($tParams, $GDIP_EPGQUALITY , 1, $GDIP_EPTLONG, DllStructGetPtr($tData))so tat mean just change .bmp ====> .jpg. but y script not working???? Edited July 16, 2007 by tonlo Link to comment Share on other sites More sharing options...
GEOSoft Posted July 23, 2007 Share Posted July 23, 2007 AutoIt does not exit by default if Escape is pressed.Not bad program, I think you should put in a DirCreate to create the folder (I had to create the folder manually for script to work). Also, don't hotkeyset the print screen key until after the splash has finished, that way there is no screen capture during startup.You could use a FileCopy() or FileMove() with the flag set to 9 which will overwrite existing and create the folder structure if required. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
hackman Posted August 23, 2007 Share Posted August 23, 2007 Now This saves in JPG Easy and any one can understand the code ...... ;Gets Screen HackMan SEND("{PRINTSCREEN}") Run("mspaint.exe") WinWaitActive("untitled - Paint") WinSetState ( "untitled - Paint", "", @SW_MAXIMIZE ) Send("!EP") Send("P") WinWaitActive("untitled - Paint") Send("!FA") Send("!T") Send("{DOWN}") Send("{DOWN}") Send("{ENTER}") Send("!N") $sFileName = @MON & @MDAY & @HOUR & @MIN & @SEC & ".jpg" Send($sFileName) Sleep(1000) Send("{ENTER}") Sleep(1000) MsgBox(0,"HackMan","This Program Has been Done by Hackman ") MsgBox(0,"HackMan","In Case if u wanna use this to some pgm pls give me credits ") EXIT 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