Sign in to follow this  
Followers 0
Generator

Windows Screener

28 posts in this topic

#1 ·  Posted (edited)

Windows Screener

Picture/Photo involves in our daily life, even screenshot is :D. Windows Screener is a small tool that allows you to takes screenshot for your needs.

Here are the list of function:

- Selectable save dictionary

- Picture format between jpg, bmp, png, gif and Tif

- AutoIncrease auto numbers your screenshot, easy to manage your saved screenshot

- 4 Different Mode to suit your case

- Full Screen Mode: Takes the screenshot of the whole screen

- Drawn Region Mode - Draw a region and it takes the screenshot only where you drew

- Program Title Mode - Takes screenshot of certain window

- Active Windows Mode - Takes screenshot of current active windows

- You can also set Hotkey of your choice

- TrayTip to display information

- Selectable quality for jpg

- Selectable format for bmp

- Selectable tif compression and color depth

- Expand to see control panel, since i was using winmove and it looked crappy(too lazy to make 2 GUI and using dlls), so i added a fadein and out and it looked just fine.

- Open default editor after screencapture

- Show or Hide Cursor

To do List:

- Timer Func, allows you to take screenshot every x min x sec

Warning:

- You have to install PaulIA's Auto3Lib to be able to run from Script, download link here : Auto3Lib

if you do not wish to install Auto3Lib then you can download the exe below.

- Non-Vista Aero Skin user, the GUI might look slightly different than it should in the picture, because the skinned button and windows

- Do not use the _SetHotkey part for malicious use.

Thanks to PaulIA for Auto3Lib and Toady for pointing me out the Hex part.

Here it is:

CODE

#Include<GUIConstants.au3>
#include<misc.au3>
#include<string.au3>
#include <A3LScreenCap.au3>

If _Singleton("Windows Screener", 1) = 0 Then
    Exit
EndIf

Opt("GUIOnEventMode", 1)
Opt("WinTitleMatchMode", 2)
Opt("TrayMenuMode", 3)
Opt("GUICloseOnEsc", 0)
Opt("GUIResizeMode", 802)

Global $Pos1, $Pos2, $l, $t, $b, $r
Global $SaveDir, $FileType = ".jpg", $AutoIncBool = True, $Mode = "FS", $FileName, $Count = 0, $Reciving, $Hex = "7B", $Hwd, $Title, $Bool = 0, $Cursor = True, $Edit = True
Global $ActiveHwd

$gui = GUICreate("Windows Screener", 600, 136, -1, -1, -1) ;New Width: 825
$savelabel = GUICtrlCreateLabel("Choose Dictionary:", 1, 5, 120, 20, $SS_CENTER)
$saveinput = GUICtrlCreateInput("", 123, 5, 322, 20, $ES_READONLY)
$browse = GUICtrlCreateButton("Browse..", 450, 3, 120, 25, $BS_CENTER)
$typelabel = GUICtrlCreateLabel("Choose File Type :", 1, 30, 120, 20, $SS_CENTER)
GUICtrlCreateGroup("", 120, 25, 450, 30)
$jpgradio = GUICtrlCreateRadio("JPG", 125, 32, 60, 20)
$bmpradio = GUICtrlCreateRadio("BMP", 190, 32, 60, 20)
$gifradio = GUICtrlCreateRadio("GIF", 255, 32, 60, 20)
$pngradio = GUICtrlCreateRadio("PNG", 320, 32, 60, 20)
$tifradio = GUICtrlCreateRadio("TIF", 385, 32, 60, 20)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$filelabel = GUICtrlCreateLabel("Insert File Name : ", 1, 60, 120, 20, $SS_CENTER)
$fileinput = GUICtrlCreateInput("ScreenShot", 123, 60, 200, 20)
$autoinc = GUICtrlCreateCheckbox("Auto Increase", 327, 60, 103, 20, -1)
$editcheck = GUICtrlCreateCheckbox("Edit", 430, 60, 50, 20, -1)
$cursorcheck = GUICtrlCreateCheckbox("Cursor", 483, 60, 90, 20, -1)
$usermode = GUICtrlCreateLabel("Usable Mode: ", 1, 85, 150, 20, $SS_CENTER)
GUICtrlCreateGroup("", 120, 78, 450, 30)
$fsradio = GUICtrlCreateRadio("Full Screen", 125, 85, 90, 20)
$drawradio = GUICtrlCreateRadio("Drawn Region", 220, 85, 105, 20)
$programradio = GUICtrlCreateRadio("Program Title", 335, 85, 100, 20)
$activeradio = GUICtrlCreateRadio("Active Windows", 438, 85, 120, 20)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$keybutton = GUICtrlCreateButton("Set Hotkey", 2, 108, 118, 25)
$keyinput = GUICtrlCreateInput("{F12}", 125, 110, 120, 20, $ES_READONLY + $ES_CENTER)
$drawbutton = GUICtrlCreateButton("Draw Region", 250, 108, 118, 25)
$WindowsInput = GUICtrlCreateInput("Your Windows Title", 370, 110, 200, 20)
$Expand = GUICtrlCreateButton(">", 575, 1, 20, 134)
$QualityLabel = GUICtrlCreateLabel("Control Panel", 600, 5, 240, 30, $SS_CENTER)
$jpglabel = GUICtrlCreateLabel("JPG: ", 600, 30, 40, 20)
$bmplabel = GUICtrlCreateLabel("BMP: ", 600, 60, 40, 20)
$Tiflabel = GUICtrlCreateLabel("TIF: ", 600, 85, 40, 20)
$jpgslider = GUICtrlCreateSlider(645, 30, 170, 20)
$bmpslider = GUICtrlCreateSlider(645, 60, 170, 20)
$tifslider1 = GUICtrlCreateSlider(645, 85, 170, 20)
$tifslider2 = GUICtrlCreateSlider(645, 108, 170, 20)



GUICtrlSetFont($savelabel, 11, 400, 0, "Tahoma")
GUICtrlSetFont($browse, 11, 400, 0, "Tahoma")
GUICtrlSetFont($typelabel, 11, 400, 0, "Tahoma")
GUICtrlSetFont($jpgradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($bmpradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($filelabel, 11, 400, 0, "Tahoma")
GUICtrlSetFont($autoinc, 11, 400, 0, "Tahoma")
GUICtrlSetFont($fileinput, 9, 400, 0, "Tahoma")
GUICtrlSetFont($saveinput, 9, 400, 0, "Tahoma")
GUICtrlSetFont($usermode, 11, 400, 0, "Tahoma")
GUICtrlSetFont($fsradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($drawradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($programradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($activeradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($keybutton, 11, 400, 0, "Tahoma")
GUICtrlSetFont($drawbutton, 11, 400, 0, "Tahoma")
GUICtrlSetFont($WindowsInput, 9, 400, 0, "Tahoma")
GUICtrlSetFont($editcheck, 11, 400, 0, "Tahoma")
GUICtrlSetFont($cursorcheck, 11, 400, 0, "Tahoma")
GUICtrlSetFont($keyinput, 9, 400, 0, "Tahoma")
GUICtrlSetFont($Expand, 11, 400, 0, "Tahoma")
GUICtrlSetFont($gifradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($pngradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($tifradio, 11, 400, 0, "Tahoma")
GUICtrlSetFont($QualityLabel, 12, 400, 0, "Tahoma")
GUICtrlSetFont($jpglabel, 11, 400, 0, "Tahoma")
GUICtrlSetFont($bmplabel, 11, 400, 0, "Tahoma")
GUICtrlSetFont($Tiflabel, 11, 400, 0, "Tahoma")
GUISetFont(9, 400, 0, "Tahoma")
GUICtrlSetData($saveinput, @DesktopDir)
GUICtrlSetLimit($fileinput, 40, 0)
GUICtrlSetLimit($jpgslider, 10, 0)
GUICtrlSetLimit($bmpslider, 4, 0)
GUICtrlSetLimit($tifslider1, 2, 0)
GUICtrlSetLimit($tifslider2, 2, 0)
GUICtrlSetTip($saveinput, "Click Browse to select save dictionary", "Help", 1, 1)
GUICtrlSetTip($WindowsInput, "Ctrl+Left Click to get Windows Title", "Help", 1, 1)
GUICtrlSetTip($fileinput, "Enter the name of the image", "Help", 1, 1)

GUICtrlSetState($autoinc, $GUI_CHECKED)
GUICtrlSetState($editcheck, $GUI_CHECKED)
GUICtrlSetState($cursorcheck, $GUI_CHECKED)
GUICtrlSetState($jpgradio, $GUI_CHECKED)
GUICtrlSetState($fsradio, $GUI_CHECKED)
GUICtrlSetState($drawradio, $GUI_DISABLE)

GUICtrlSetOnEvent($Expand, "_Sliding")
GUICtrlSetOnEvent($jpgslider, "_JPGSlide")
GUICtrlSetOnEvent($bmpslider, "_BMPSlide")
GUICtrlSetOnEvent($tifslider1, "_TifSlide1")
GUICtrlSetOnEvent($tifslider2, "_TifSlide2")
GUICtrlSetOnEvent($keybutton, "_SetHotkey")
GUICtrlSetOnEvent($drawbutton, "_DrawRegion")
GUICtrlSetOnEvent($fsradio, "_FSMode")
GUICtrlSetOnEvent($drawradio, "_DRMode")
GUICtrlSetOnEvent($programradio, "_PTMode")
GUICtrlSetOnEvent($activeradio, "_AWMode")
GUICtrlSetOnEvent($jpgradio, "_FileToJpg")
GUICtrlSetOnEvent($bmpradio, "_FileToBmp")
GUICtrlSetOnEvent($gifradio, "_FileToGif")
GUICtrlSetOnEvent($tifradio, "_FileToTif")
GUICtrlSetOnEvent($pngradio, "_FileToPng")
GUICtrlSetOnEvent($autoinc, "_AutoInc")
GUICtrlSetOnEvent($browse, "_Browse")
GUICtrlSetOnEvent($editcheck, "_EditCheck")
GUICtrlSetOnEvent($cursorcheck, "_CursorCheck")
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

_Hide()
WinSetTrans($gui, "", 0)
_FadeIn()

While 1
    _Check()
    _Setting()
    _ActiveHwd()
    If _IsPressed("01") And _IsPressed("A2") Then
        $Winlist = WinList()
        For $list = 1 To $Winlist[0][0]
            If WinActive($Winlist[$list][1]) Then
                $WinTitle = $Winlist[$list][0]
                $Hwd = $Winlist[$list][1]
            EndIf
        Next
        ControlSetText($gui, "", "Edit4", $WinTitle)
    EndIf
    If _IsPressed($Hex) Then
        If $AutoIncBool Then
            If $Mode = "FS" Then
                _ScreenCap_Capture ($SaveDir & "\" & $FileName & " - " & $Count & $FileType, 0, 0, -1, -1, $Cursor)
                _TrayTip()
                _ShellExecute()
                $Count = $Count + 1
            ElseIf $Mode = "DR" Then
                _ScreenCap_Capture ($SaveDir & "\" & $FileName & " - " & $Count & $FileType, $l, $t, $r, $b, $Cursor)
                _TrayTip()
                _ShellExecute()
                $Count = $Count + 1
            ElseIf $Mode = "PT" Then
                If Not WinExists($Title, "") Then
                    _ToolTip()
                Else
                    _ScreenCap_CaptureWnd ($SaveDir & "\" & $FileName & " - " & $Count & $FileType, $Hwd, 0, 0, -1, -1, $Cursor)
                    _TrayTip()
                    _ShellExecute()
                    $Count = $Count + 1
                EndIf
            ElseIf $Mode = "AW" Then
                _ScreenCap_CaptureWnd ($SaveDir & "\" & $FileName & " - " & $Count & $FileType, $ActiveHwd, 0, 0, -1, -1, $Cursor)
                _TrayTip()
                _ShellExecute()
                $Count = $Count + 1
            EndIf
        Else
            If $Mode = "FS" Then
                _ScreenCap_Capture ($SaveDir & "\" & $FileName & $FileType, 0, 0, -1, -1, $Cursor)
                _TrayTip()
                _ShellExecute()
            ElseIf $Mode = "DR" Then
                _ScreenCap_Capture ($SaveDir & "\" & $FileName & $FileType, $l, $t, $r, $b, $Cursor)
                _TrayTip()
                _ShellExecute()
            ElseIf $Mode = "PT" Then
                If Not WinExists($Title, "") Then
                    _ToolTip()
                Else
                    _ScreenCap_CaptureWnd ($SaveDir & "\" & $FileName & $FileType, $Hwd, 0, 0, -1, -1, $Cursor)
                    _TrayTip()
                    _ShellExecute()
                EndIf
            ElseIf $Mode = "AW" Then
                _ScreenCap_CaptureWnd ($SaveDir & "\" & $FileName & $FileType, $ActiveHwd, 0, 0, -1, -1, $Cursor)
                _TrayTip()
                _ShellExecute()
            EndIf
        EndIf
        While _IsPressed($Hex)
            Sleep(1)
        WEnd
    EndIf
    Sleep(1)
WEnd
Func _Exit()
    _FadeOut()
    Exit
EndFunc   ;==>_Exit
Func _Browse()
    $Dir = FileSelectFolder("", "", 1)
    If @error = 1 Then
        Return
    Else
        GUICtrlSetData($saveinput, $Dir)
    EndIf
EndFunc   ;==>_Browse
Func _AutoInc()
    $AutoIncBool = Not $AutoIncBool
EndFunc   ;==>_AutoInc
Func _FileToJpg()
    $FileType = ".jpg"
EndFunc   ;==>_FileToJpg
Func _FileToTif()
    $FileType = ".tif"
EndFunc   ;==>_FileToTif
Func _FileToPng()
    $FileType = ".png"
EndFunc   ;==>_FileToPng
Func _FileToGif()
    $FileType = ".gif"
EndFunc   ;==>_FileToGif
Func _FileToBmp()
    $FileType = ".bmp"
EndFunc   ;==>_FileToBmp
Func _FSMode()
    $Mode = "FS"
EndFunc   ;==>_FSMode
Func _DRMode()
    $Mode = "DR"
EndFunc   ;==>_DRMode
Func _PTMode()
    $Mode = "PT"
EndFunc   ;==>_PTMode
Func _AWMode()
    $Mode = "AW"
EndFunc   ;==>_AWMode
Func _Check()
    $Title = GUICtrlRead($WindowsInput)
    $SaveDir = GUICtrlRead($saveinput)
    $FileName = GUICtrlRead($fileinput)
    Return $Title And $SaveDir And $fileinput
EndFunc   ;==>_Check
Func _Setting()
    _ScreenCap_SetJPGQuality (GUICtrlRead($jpgslider) * 10)
    _ScreenCap_SetBMPFormat (GUICtrlRead($bmpslider))
    _ScreenCap_SetTIFColorDepth (_TifColorDepth())
    _ScreenCap_SetTIFCompression (GUICtrlRead($tifslider2))
EndFunc   ;==>_Setting
Func _DrawRegion()
    _FadeOut()
    Do
        Local $Pos = MouseGetPos()
        ToolTip("Draw Region" & @CRLF & "Mouse Coord: " & $Pos[0] & "," & $Pos[1])
    Until _IsPressed("01")
    If _IsPressed("01") Then
        $Pos1 = MouseGetPos()
        Do
            $Pos2 = MouseGetPos()
            _Compare()
            ToolTip("Drawing Region" & @CRLF & "Left: " & $l & @CRLF & "Top: " & $t & @CRLF & "Bottom: " & $b & @CRLF & "Right: " & $r & @CRLF & "Image Size:" & $r - $l & "x" & $b - $t)
        Until Not _IsPressed("01")
        ToolTip("")
        If Not _Compare() Then TrayTip("Windows Screener", "Invaild Coord", "", 1)
    EndIf
    GUICtrlSetState($drawradio, $GUI_ENABLE)
    _FadeIn()
EndFunc   ;==>_DrawRegion
Func _SetHotkey()
    _FadeOut()
    $Reciving = True
    Do
        For $i = 8 To 165
            If _IsPressed(Hex($i, 2)) Then
                $Hex = Hex($i, 2)
                If $Hex = "08" Then GUICtrlSetData($keyinput, "{" & "BACKSPACE" & "}")
                If $Hex = "09" Then GUICtrlSetData($keyinput, "{" & "TAB" & "}")
                If $Hex = "0C" Then GUICtrlSetData($keyinput, "{" & "ClEAR" & "}")
                If $Hex = "0D" Then GUICtrlSetData($keyinput, "{" & "ENTER" & "}")
                If $Hex = "10" Then GUICtrlSetData($keyinput, "{" & "SHIFT" & "}")
                If $Hex = "11" Then GUICtrlSetData($keyinput, "{" & "CTRL" & "}")
                If $Hex = "12" Then GUICtrlSetData($keyinput, "{" & "ALT" & "}")
                If $Hex = "13" Then GUICtrlSetData($keyinput, "{" & "PAUSE" & "}")
                If $Hex = "14" Then GUICtrlSetData($keyinput, "{" & "CAPS LOCK" & "}")
                If $Hex = "1B" Then GUICtrlSetData($keyinput, "{" & "ESC" & "}")
                If $Hex = "20" Then GUICtrlSetData($keyinput, "{" & "SPACEBAR" & "}")
                If $Hex = "21" Then GUICtrlSetData($keyinput, "{" & "PAGE UP" & "}")
                If $Hex = "22" Then GUICtrlSetData($keyinput, "{" & "PAGE DOWN" & "}")
                If $Hex = "23" Then GUICtrlSetData($keyinput, "{" & "END" & "}")
                If $Hex = "24" Then GUICtrlSetData($keyinput, "{" & "HOME" & "}")
                If $Hex = "25" Then GUICtrlSetData($keyinput, "{" & "LEFT ARROW" & "}")
                If $Hex = "26" Then GUICtrlSetData($keyinput, "{" & "UP ARROW" & "}")
                If $Hex = "27" Then GUICtrlSetData($keyinput, "{" & "RIGHT ARROW" & "}")
                If $Hex = "28" Then GUICtrlSetData($keyinput, "{" & "DOWN ARROW" & "}")
                If $Hex = "29" Then GUICtrlSetData($keyinput, "{" & "SELECT" & "}")
                If $Hex = "2A" Then GUICtrlSetData($keyinput, "{" & "PRINT" & "}")
                If $Hex = "2B" Then GUICtrlSetData($keyinput, "{" & "EXECUTE" & "}")
                If $Hex = "2C" Then GUICtrlSetData($keyinput, "{" & "PRINT SCREEN" & "}")
                If $Hex = "2D" Then GUICtrlSetData($keyinput, "{" & "INS" & "}")
                If $Hex = "2E" Then GUICtrlSetData($keyinput, "{" & "DEL" & "}")
                If $Hex = "30" Then GUICtrlSetData($keyinput, "{" & "0" & "}")
                If $Hex = "31" Then GUICtrlSetData($keyinput, "{" & "1" & "}")
                If $Hex = "32" Then GUICtrlSetData($keyinput, "{" & "2" & "}")
                If $Hex = "33" Then GUICtrlSetData($keyinput, "{" & "3" & "}")
                If $Hex = "34" Then GUICtrlSetData($keyinput, "{" & "4" & "}")
                If $Hex = "35" Then GUICtrlSetData($keyinput, "{" & "5" & "}")
                If $Hex = "36" Then GUICtrlSetData($keyinput, "{" & "6" & "}")
                If $Hex = "37" Then GUICtrlSetData($keyinput, "{" & "7" & "}")
                If $Hex = "38" Then GUICtrlSetData($keyinput, "{" & "8" & "}")
                If $Hex = "39" Then GUICtrlSetData($keyinput, "{" & "9" & "}")
                If $Hex = "41" Then GUICtrlSetData($keyinput, "{" & "A" & "}")
                If $Hex = "42" Then GUICtrlSetData($keyinput, "{" & "B" & "}")
                If $Hex = "43" Then GUICtrlSetData($keyinput, "{" & "C" & "}")
                If $Hex = "44" Then GUICtrlSetData($keyinput, "{" & "D" & "}")
                If $Hex = "45" Then GUICtrlSetData($keyinput, "{" & "E" & "}")
                If $Hex = "46" Then GUICtrlSetData($keyinput, "{" & "F" & "}")
                If $Hex = "47" Then GUICtrlSetData($keyinput, "{" & "G" & "}")
                If $Hex = "48" Then GUICtrlSetData($keyinput, "{" & "H" & "}")
                If $Hex = "49" Then GUICtrlSetData($keyinput, "{" & "I" & "}")
                If $Hex = "4A" Then GUICtrlSetData($keyinput, "{" & "J" & "}")
                If $Hex = "4B" Then GUICtrlSetData($keyinput, "{" & "K" & "}")
                If $Hex = "4C" Then GUICtrlSetData($keyinput, "{" & "L" & "}")
                If $Hex = "4D" Then GUICtrlSetData($keyinput, "{" & "M" & "}")
                If $Hex = "4E" Then GUICtrlSetData($keyinput, "{" & "N" & "}")
                If $Hex = "4F" Then GUICtrlSetData($keyinput, "{" & "O" & "}")
                If $Hex = "50" Then GUICtrlSetData($keyinput, "{" & "P" & "}")
                If $Hex = "51" Then GUICtrlSetData($keyinput, "{" & "Q" & "}")
                If $Hex = "52" Then GUICtrlSetData($keyinput, "{" & "R" & "}")
                If $Hex = "53" Then GUICtrlSetData($keyinput, "{" & "S" & "}")
                If $Hex = "54" Then GUICtrlSetData($keyinput, "{" & "T" & "}")
                If $Hex = "55" Then GUICtrlSetData($keyinput, "{" & "U" & "}")
                If $Hex = "56" Then GUICtrlSetData($keyinput, "{" & "V" & "}")
                If $Hex = "57" Then GUICtrlSetData($keyinput, "{" & "W" & "}")
                If $Hex = "58" Then GUICtrlSetData($keyinput, "{" & "X" & "}")
                If $Hex = "59" Then GUICtrlSetData($keyinput, "{" & "Y" & "}")
                If $Hex = "5A" Then GUICtrlSetData($keyinput, "{" & "Z" & "}")
                If $Hex = "5B" Then GUICtrlSetData($keyinput, "{" & "Left Windows" & "}")
                If $Hex = "5C" Then GUICtrlSetData($keyinput, "{" & "Right Windows" & "}")
                If $Hex = "60" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 0" & "}")
                If $Hex = "61" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 1" & "}")
                If $Hex = "62" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 2" & "}")
                If $Hex = "63" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 3" & "}")
                If $Hex = "64" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 4" & "}")
                If $Hex = "65" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 5" & "}")
                If $Hex = "66" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 6" & "}")
                If $Hex = "67" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 7" & "}")
                If $Hex = "68" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 8" & "}")
                If $Hex = "69" Then GUICtrlSetData($keyinput, "{" & "NUMPAD 9" & "}")
                If $Hex = "6A" Then GUICtrlSetData($keyinput, "{" & "NUMPAD *" & "}")
                If $Hex = "6B" Then GUICtrlSetData($keyinput, "{" & "NUMPAD +" & "}")
                If $Hex = "6C" Then GUICtrlSetData($keyinput, "{" & "NUMPAD Separator" & "}")
                If $Hex = "6D" Then GUICtrlSetData($keyinput, "{" & "NUMPAD -" & "}")
                If $Hex = "6E" Then GUICtrlSetData($keyinput, "{" & "NUMPAD ." & "}")
                If $Hex = "6F" Then GUICtrlSetData($keyinput, "{" & "NUMPAD /" & "}")
                If $Hex = "70" Then GUICtrlSetData($keyinput, "{" & "F1" & "}")
                If $Hex = "71" Then GUICtrlSetData($keyinput, "{" & "F2" & "}")
                If $Hex = "72" Then GUICtrlSetData($keyinput, "{" & "F3" & "}")
                If $Hex = "73" Then GUICtrlSetData($keyinput, "{" & "F4" & "}")
                If $Hex = "74" Then GUICtrlSetData($keyinput, "{" & "F5" & "}")
                If $Hex = "75" Then GUICtrlSetData($keyinput, "{" & "F6" & "}")
                If $Hex = "76" Then GUICtrlSetData($keyinput, "{" & "F7" & "}")
                If $Hex = "77" Then GUICtrlSetData($keyinput, "{" & "F8" & "}")
                If $Hex = "78" Then GUICtrlSetData($keyinput, "{" & "F9" & "}")
                If $Hex = "79" Then GUICtrlSetData($keyinput, "{" & "F10" & "}")
                If $Hex = "7A" Then GUICtrlSetData($keyinput, "{" & "F11" & "}")
                If $Hex = "7B" Then GUICtrlSetData($keyinput, "{" & "F12" & "}")
                If $Hex = "90" Then GUICtrlSetData($keyinput, "{" & "NUM LOCK" & "}")
                If $Hex = "91" Then GUICtrlSetData($keyinput, "{" & "SCROLL LOCK" & "}")
                If $Hex = "A4" Then GUICtrlSetData($keyinput, "{" & "LEFT MENU" & "}")
                If $Hex = "A5" Then GUICtrlSetData($keyinput, "{" & "RIGHT MENU" & "}")
                $Reciving = False
            EndIf
        Next
    Until $Reciving = False
    _FadeIn()
EndFunc   ;==>_SetHotkey
Func _FadeOut()
    For $i = 255 To 0 Step - 1
        WinSetTrans($gui, "", $i)
    Next
    GUISetState(@SW_HIDE, $gui)
EndFunc   ;==>_FadeOut
Func _FadeIn()
    GUISetState(@SW_SHOW, $gui)
    For $i = 0 To 255
        WinSetTrans($gui, "", $i)
    Next
EndFunc   ;==>_FadeIn
Func _ToolTip()
    TrayTip("Windows Screener", $Title & " was not found", "", 1)
EndFunc   ;==>_ToolTip
Func _TrayTip()
    If $AutoIncBool Then
        TrayTip("Screenshot has been successfully saved", "Saved Dir: " & $SaveDir & @CRLF & "FileName: " & $FileName & " - " & $Count & $FileType, "", 1)
    Else
        TrayTip("Screenshot has been successfully saved", "Saved Dir: " & $SaveDir & @CRLF & "FileName: " & $FileName & $FileType, "", 1)
    EndIf
EndFunc   ;==>_TrayTip
Func _Compare()
    If $Pos2[0] < $Pos1[0] And $Pos2[1] < $Pos1[1] Then
        $l = $Pos2[0]
        $t = $Pos2[1]
        $b = $Pos1[1]
        $r = $Pos1[0]
        Return 1
    ElseIf $Pos2[0] > $Pos1[0] And $Pos2[1] < $Pos1[1] Then
        $l = $Pos1[0]
        $t = $Pos2[1]
        $b = $Pos1[1]
        $r = $Pos2[0]
        Return 1
    ElseIf $Pos2[0] > $Pos1[0] And $Pos2[1] > $Pos1[1] Then
        $l = $Pos1[0]
        $t = $Pos1[1]
        $b = $Pos2[1]
        $r = $Pos2[0]
        Return 1
    ElseIf $Pos2[0] < $Pos1[0] And $Pos2[1] > $Pos1[1] Then
        $l = $Pos2[0]
        $t = $Pos1[1]
        $b = $Pos2[1]
        $r = $Pos1[0]
        Return 1
    Else
        Return 0
    EndIf
EndFunc   ;==>_Compare
Func _JPGSlide()
    TrayTip("Windows Resizer", "You have set the quality for jpg to " & GUICtrlRead($jpgslider) * 10, "", 1)
EndFunc   ;==>_JPGSlide
Func _BMPSlide()
    If GUICtrlRead($bmpslider) = 0 Then
        TrayTip("Windows Resizer", "You have set the BMP format to 16 bpp; 5 bits for each RGB component", "", 1)
    ElseIf GUICtrlRead($bmpslider) = 1 Then
        TrayTip("Windows Resizer", "You have set the BMP format to 16 bpp; 5 bits for red, 6 bits for green and 5 bits blue", "", 1)
    ElseIf GUICtrlRead($bmpslider) = 2 Then
        TrayTip("Windows Resizer", "You have set the BMP format to 24 bpp; 8 bits for each RGB component", "", 1)
    ElseIf GUICtrlRead($bmpslider) = 3 Then
        TrayTip("Windows Resizer", "You have set the BMP format to 32 bpp; 8 bits for each RGB component. No alpha component", "", 1)
    ElseIf GUICtrlRead($bmpslider) = 4 Then
        TrayTip("Windows Resizer", "You have set the BMP format to 8 bits for each RGB and alpha component", "", 1)
    EndIf
EndFunc   ;==>_BMPSlide
Func _TifSlide1()
    If GUICtrlRead($tifslider1) = 0 Then
        TrayTip("Windows Resizer", "You have set the color depth to Default encoder color depth", "", 1)
    ElseIf GUICtrlRead($tifslider1) = 1 Then
        TrayTip("Windows Resizer", "You have set the color depth to 24 bit", "", 1)
    ElseIf GUICtrlRead($tifslider1) = 2 Then
        TrayTip("Windows Resizer", "You have set the color depth to 32 bit", "", 1)
    EndIf
EndFunc   ;==>_TifSlide1
Func _TifSlide2()
    If GUICtrlRead($tifslider2) = 0 Then
        TrayTip("Windows Resizer", "You have set the compression used for TIFF to Default encoder compression", "", 1)
    ElseIf GUICtrlRead($tifslider2) = 1 Then
        TrayTip("Windows Resizer", "You have set the compression used for TIFF to No compression", "", 1)
    ElseIf GUICtrlRead($tifslider2) = 2 Then
        TrayTip("Windows Resizer", "You have set the compression used for TIFF to LZW compression", "", 1)
    EndIf
EndFunc   ;==>_TifSlide2
Func _TifColorDepth()
    If GUICtrlRead($tifslider1) = 0 Then
        Return 0
    ElseIf GUICtrlRead($tifslider1) = 1 Then
        Return 24
    ElseIf GUICtrlRead($tifslider1) = 2 Then
        Return 32
    EndIf
EndFunc   ;==>_TifColorDepth
Func _Sliding()
    $Bool = Not $Bool
    If $Bool Then
        GUICtrlSetData($Expand, "<")
        _SlideOut()
    Else
        GUICtrlSetData($Expand, ">")
        _SlideIn()
    EndIf
EndFunc   ;==>_Sliding
Func _SlideOut()
    Local $WinPos = WinGetPos($gui, "")
    _Show()
    _FadeOut()
    WinMove($gui, "", $WinPos[0], $WinPos[1], 825, 160)
    _FadeIn()
EndFunc   ;==>_SlideOut
Func _SlideIn()
    Local $WinPos = WinGetPos($gui, "")
    _FadeOut()
    WinMove($gui, "", $WinPos[0], $WinPos[1], 603, 160)
    _FadeIn()
    _Hide()
EndFunc   ;==>_SlideIn
Func _Show()
    GUICtrlSetState($jpglabel, $GUI_SHOW)
    GUICtrlSetState($bmplabel, $GUI_SHOW)
    GUICtrlSetState($Tiflabel, $GUI_SHOW)
    GUICtrlSetState($jpgslider, $GUI_SHOW)
    GUICtrlSetState($bmpslider, $GUI_SHOW)
    GUICtrlSetState($tifslider1, $GUI_SHOW)
    GUICtrlSetState($tifslider2, $GUI_SHOW)
    GUICtrlSetState($QualityLabel, $GUI_SHOW)
EndFunc   ;==>_Show
Func _Hide()
    GUICtrlSetState($jpglabel, $GUI_HIDE)
    GUICtrlSetState($bmplabel, $GUI_HIDE)
    GUICtrlSetState($Tiflabel, $GUI_HIDE)
    GUICtrlSetState($jpgslider, $GUI_HIDE)
    GUICtrlSetState($bmpslider, $GUI_HIDE)
    GUICtrlSetState($tifslider1, $GUI_HIDE)
    GUICtrlSetState($tifslider2, $GUI_HIDE)
    GUICtrlSetState($QualityLabel, $GUI_HIDE)
EndFunc   ;==>_Hide
Func _EditCheck()
    $Edit = Not $Edit
EndFunc   ;==>_EditCheck
Func _CursorCheck()
    $Cursor = Not $Cursor
EndFunc   ;==>_CursorCheck
Func _ActiveHwd()
    $Winlist = WinList()
    For $list = 1 To $Winlist[0][0]
        If WinActive($Winlist[$list][1]) Then
            $WinTitle = $Winlist[$list][0]
            $ActiveHwd = $Winlist[$list][1]
        EndIf
    Next
EndFunc   ;==>_ActiveHwd
Func _ShellExecute()
    If $Edit And $AutoIncBool Then
        ShellExecute($SaveDir & "\" & $FileName & " - " & $Count & $FileType)
    ElseIf $Edit And Not $AutoIncBool Then
        ShellExecute($SaveDir & "\" & $FileName & $FileType)
    EndIf
EndFunc   ;==>_ShellExecute

Attachment Section:

Windows_Screener.au3

Any comment or suggestion is appreciated, or if you find any bug please report.

Edit: Added _SingleTon, Tidied, Fixed Fade in effect at beginning, Added TrayTip to display information

Edit 2: Fixed Major bug on Drawing region(Didn't realize you can draw in 4 ways), Added file format such as gif, png, tif, Added Control Panel for Picture setting, Fixed multi screenshot taken while button is being held down

Edit 3: Updated

Edited by Generator

Share this post


Link to post
Share on other sites



Any comment or suggestions?

Share this post


Link to post
Share on other sites

Very nice! Good work :rolleyes:

The fade in and fade out is extremly slow on my PC for some reason. It might be because im using my work pc lol.

I just made something like this today for something I do at work. I do have some suggestions.

1. Add a JPEG quality slider so the user can adjust the amount of compression.

2. Add GIF and PNG and maybe TIFF as file types.

3. Display the dimensions when the user is selection a region to screenshot.

Here is my script I wrote today, check out the way it lets user select a screen region.

;==============================================
; Author: Toady
;
; Purpose: Takes screenshot of
; a user selected region and saves
; the screenshot in ./images directory.
;
; How to use:
; Press "s" key to select region corners.
; NOTE: Must select top-left of region
; first, then select bottom-right of region.
;=============================================

#include <A3LScreenCap.au3>
#include <misc.au3>
#include <GuiConstants.au3>
_Singleton("cap")

Global $format = ".jpg"
Global $filename = ""
DirCreate(@ScriptDir & "/images/")
$GUI = GUICreate("Screenshot capture",240,180,-1,-1)
GUICtrlCreateGroup("Select Format",18,10,210,50)
$radio1 = GUICtrlCreateRadio("JPG",30,30,40)
GuiCtrlSetState(-1, $GUI_CHECKED)
$radio2 = GUICtrlCreateRadio("BMP",80,30,45)
$radio3 = GUICtrlCreateRadio("GIF",130,30,45)
$radio4 = GUICtrlCreateRadio("PNG",180,30,45)
GUICtrlCreateGroup ("",-99,-99,1,1) 
GUICtrlCreateLabel("Name of image",20,80)
$gui_img_input = GUICtrlCreateInput("",20,100,200,20)
$go_button = GUICtrlCreateButton("Select region",20,140,200,30)
GUISetState(@SW_SHOW,$GUI)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $radio1
            $format = ".jpg"
        Case $msg = $radio2
            $format = ".bmp"
        Case $msg = $radio3
            $format = ".gif"
        Case $msg = $radio4
            $format = ".png"
        Case $msg = $go_button
            $filename = GUICtrlRead($gui_img_input)
            If $filename <> "" Then
                GUISetState(@SW_HIDE,$GUI)
                _TakeScreenShot()
                GUICtrlSetData($gui_img_input,"")
                GUISetState(@SW_SHOW,$GUI)
            Else
                MsgBox(0,"Error","Enter a filename")
            EndIf
    EndSelect
WEnd

Func _TakeScreenShot()
    HotKeySet("s","_DoNothing")
    While Not _IsPressed(Hex(83,2))
        Local $currCoord = MouseGetPos()
        Sleep(10)
        ToolTip("Select top-left coord with 's' key" & @CRLF & "First coord: " & $currCoord[0] & "," & $currCoord[1])
        If _IsPressed(Hex(83,2)) Then
            While _IsPressed(Hex(83,2))
                Sleep(10)
            WEnd
            ExitLoop 1
        EndIf
    WEnd
    Local $firstCoord = MouseGetPos()
    While Not _IsPressed(Hex(83,2))
        Local $currCoord = MouseGetPos()
        Sleep(10)
        ToolTip("Select bottom-right coord with 's' key" & @CRLF & "First coord: " & $firstCoord[0] & "," & $firstCoord[1] _ 
        & @CRLF & "Second coord: " & $currCoord[0] & "," & $currCoord[1] & @CRLF & "Image size: " & _
        $currCoord[0]-$firstCoord[0] & "x" & $currCoord[1]-$firstCoord[1])
        If _IsPressed(Hex(83,2)) Then
            While _IsPressed(Hex(83,2))
                Sleep(10)
            WEnd
            ExitLoop 1
        EndIf
    WEnd
    ToolTip("")
    Local $secondCoord = MouseGetPos()
    _ScreenCap_SetJPGQuality(80)
    _ScreenCap_Capture(@ScriptDir & "\images\" & $filename & $format, $firstCoord[0],$firstCoord[1],$secondCoord[0],$secondCoord[1])
    For $i = 1 To 100
        ToolTip("Imaged saved")
        Sleep(1)
    Next
    ToolTip("")
    HotKeySet("s")
EndFunc

Func _DoNothing()
EndFunc

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

Very nice! Good work :rolleyes:

The fade in and fade out is extremly slow on my PC for some reason. It might be because im using my work pc lol.

I just made something like this today for something I do at work. I do have some suggestions.

1. Add a JPEG quality slider so the user can adjust the amount of compression.

2. Add GIF and PNG and maybe TIFF as file types.

3. Display the dimensions when the user is selection a region to screenshot.

Here is my script I wrote today, check out the way it lets user select a screen region.

;==============================================
; Author: Toady
;
; Purpose: Takes screenshot of
; a user selected region and saves
; the screenshot in ./images directory.
;
; How to use:
; Press "s" key to select region corners.
; NOTE: Must select top-left of region
; first, then select bottom-right of region.
;=============================================

#include <A3LScreenCap.au3>
#include <misc.au3>
#include <GuiConstants.au3>
_Singleton("cap")

Global $format = ".jpg"
Global $filename = ""
DirCreate(@ScriptDir & "/images/")
$GUI = GUICreate("Screenshot capture",240,180,-1,-1)
GUICtrlCreateGroup("Select Format",18,10,210,50)
$radio1 = GUICtrlCreateRadio("JPG",30,30,40)
GuiCtrlSetState(-1, $GUI_CHECKED)
$radio2 = GUICtrlCreateRadio("BMP",80,30,45)
$radio3 = GUICtrlCreateRadio("GIF",130,30,45)
$radio4 = GUICtrlCreateRadio("PNG",180,30,45)
GUICtrlCreateGroup ("",-99,-99,1,1) 
GUICtrlCreateLabel("Name of image",20,80)
$gui_img_input = GUICtrlCreateInput("",20,100,200,20)
$go_button = GUICtrlCreateButton("Select region",20,140,200,30)
GUISetState(@SW_SHOW,$GUI)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $radio1
            $format = ".jpg"
        Case $msg = $radio2
            $format = ".bmp"
        Case $msg = $radio3
            $format = ".gif"
        Case $msg = $radio4
            $format = ".png"
        Case $msg = $go_button
            $filename = GUICtrlRead($gui_img_input)
            If $filename <> "" Then
                GUISetState(@SW_HIDE,$GUI)
                _TakeScreenShot()
                GUICtrlSetData($gui_img_input,"")
                GUISetState(@SW_SHOW,$GUI)
            Else
                MsgBox(0,"Error","Enter a filename")
            EndIf
    EndSelect
WEnd

Func _TakeScreenShot()
    HotKeySet("s","_DoNothing")
    While Not _IsPressed(Hex(83,2))
        Local $currCoord = MouseGetPos()
        Sleep(10)
        ToolTip("Select top-left coord with 's' key" & @CRLF & "First coord: " & $currCoord[0] & "," & $currCoord[1])
        If _IsPressed(Hex(83,2)) Then
            While _IsPressed(Hex(83,2))
                Sleep(10)
            WEnd
            ExitLoop 1
        EndIf
    WEnd
    Local $firstCoord = MouseGetPos()
    While Not _IsPressed(Hex(83,2))
        Local $currCoord = MouseGetPos()
        Sleep(10)
        ToolTip("Select bottom-right coord with 's' key" & @CRLF & "First coord: " & $firstCoord[0] & "," & $firstCoord[1] _ 
        & @CRLF & "Second coord: " & $currCoord[0] & "," & $currCoord[1] & @CRLF & "Image size: " & _
        $currCoord[0]-$firstCoord[0] & "x" & $currCoord[1]-$firstCoord[1])
        If _IsPressed(Hex(83,2)) Then
            While _IsPressed(Hex(83,2))
                Sleep(10)
            WEnd
            ExitLoop 1
        EndIf
    WEnd
    ToolTip("")
    Local $secondCoord = MouseGetPos()
    _ScreenCap_SetJPGQuality(80)
    _ScreenCap_Capture(@ScriptDir & "\images\" & $filename & $format, $firstCoord[0],$firstCoord[1],$secondCoord[0],$secondCoord[1])
    For $i = 1 To 100
        ToolTip("Imaged saved")
        Sleep(1)
    Next
    ToolTip("")
    HotKeySet("s")
EndFunc

Func _DoNothing()
EndFunc

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Updated and fixed bugs.

To Toady:

All your requests are added in :rolleyes:

Edited by Generator

Share this post


Link to post
Share on other sites

Haven't tried it. You say - Do not use the _SetHotkey part for malicious use. I don't see how anyone will modify that into a keylogger or anything. It's too slow, and it's a slightly modified version of _IsPressed..

Share this post


Link to post
Share on other sites

Haven't tried it. You say - Do not use the _SetHotkey part for malicious use. I don't see how anyone will modify that into a keylogger or anything. It's too slow, and it's a slightly modified version of _IsPressed..

Regard to all the post these days, mentioned me 2o2 posting keylogger and some random member attempting something malicious. Actually it is pretty fast if you test it.

Share this post


Link to post
Share on other sites

Very nice additions, great work! :rolleyes:

The height of the GUI is kinda small, im using XP and almost half of the bottom controls is not visible. Maybe use @OSVersion and set the height a little bigger for XP users (20 pixels more) and normal for vista users.

The keybinding is kinda slow, seems like it lags a little, maybe its because your doing a lot of comparisons to see what key they pressed. To make this a lot faster just use an array, it will eliminate all comparisons and make your code smaller.. check out the code below. You will need to use a scancodes.txt file that is an INI. Download it below.

#include <array.au3>

Global $scancodes = @ScriptDir & "\scancodes.txt"
_LoadKeyBoardLayout($scancodes)

While 1
    For $i = 8 To 165
        If _IsPressed(Hex($i,2)) Then
            MsgBox(0,"Your pressed", $keyboardLayout[$i])
        EndIf
    Next
    Sleep(1)
WEnd

Func _LoadKeyBoardLayout($file)
    Local $ini = IniReadSection($file,"keyboard")
    Global $keyboardLayout = _ArrayCreate($ini[1][1])
    For $i = 2 To $ini[0][0]
        ReDim $keyboardLayout[UBound($keyboardLayout)+1]
        $keyboardLayout[UBound($keyboardLayout)-1] = $ini[$i][1]
    Next
EndFunc

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

Very nice additions, great work! :rolleyes:

The height of the GUI is kinda small, im using XP and almost half of the bottom controls is not visible. Maybe use @OSVersion and set the height a little bigger for XP users (20 pixels more) and normal for vista users.

The keybinding is kinda slow, seems like it lags a little, maybe its because your doing a lot of comparisons to see what key they pressed. To make this a lot faster just use an array, it will eliminate all comparisons and make your code smaller.. check out the code below. You will need to use a scancodes.txt file that is an INI. Download it below.

#include <array.au3>

Global $scancodes = @ScriptDir & "\scancodes.txt"
_LoadKeyBoardLayout($scancodes)

While 1
    For $i = 8 To 165
        If _IsPressed(Hex($i,2)) Then
            MsgBox(0,"Your pressed", $keyboardLayout[$i])
        EndIf
    Next
    Sleep(1)
WEnd

Func _LoadKeyBoardLayout($file)
    Local $ini = IniReadSection($file,"keyboard")
    Global $keyboardLayout = _ArrayCreate($ini[1][1])
    For $i = 2 To $ini[0][0]
        ReDim $keyboardLayout[UBound($keyboardLayout)+1]
        $keyboardLayout[UBound($keyboardLayout)-1] = $ini[$i][1]
    Next
EndFunc
I did a timer test, but the result came out as 15 mils of ms, i doubt it. The reason why is slow is actually depends on your PC speed for the FadeIn effect. On my computer, it takes about 1 sec to fade in, on my other computer, it takes about 3-4 seconds. I am not good with Arrays so i am not going to use your method, try to get rid of the fadein and see how it goes. I always want the GUI to be as small as possible and no extra file for just 1 program, just change the height to suit you and complie it and it will look all good. Btw i am not a Vista user, i just skinned by XP with Vista Aero, so that's why i said the GUI might look different than the 1 in picture.

Thanks for the comment and more comments and suggestion is appreciated.

Share this post


Link to post
Share on other sites

I did a timer test, but the result came out as 15 mils of ms, i doubt it. The reason why is slow is actually depends on your PC speed for the FadeIn effect. On my computer, it takes about 1 sec to fade in, on my other computer, it takes about 3-4 seconds. I am not good with Arrays so i am not going to use your method, try to get rid of the fadein and see how it goes. I always want the GUI to be as small as possible and no extra file for just 1 program, just change the height to suit you and complie it and it will look all good. Btw i am not a Vista user, i just skinned by XP with Vista Aero, so that's why i said the GUI might look different than the 1 in picture.

Thanks for the comment and more comments and suggestion is appreciated.

k good work.


www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Share this post


Link to post
Share on other sites

I stumbled across this while looking for something else and decided to give it a try. I've been using ScreenHunter for my capture needs and wanted to see how this compared and also to learn more about the autoit languge.

What I found was that the jpg and gif image qualities weren't great compared to the png and bmp quality. Also the tiff file did not have a preview when opened with Windows Picture and Fax Viewer.

The other thing I noticed when playing with the draw region feature was that the Windows Screener GUI shows up (despite it having faded away) in the screenshot if the region includes the area the "invisible" GUI is located. I thought that was kind of odd.

Otherwise very cool stuff a person can do with autoit if they know what they are doing. I hope over time to be able to create some scripts I can get feedback on.

Share this post


Link to post
Share on other sites

I stumbled across this while looking for something else and decided to give it a try. I've been using ScreenHunter for my capture needs and wanted to see how this compared and also to learn more about the autoit languge.

What I found was that the jpg and gif image qualities weren't great compared to the png and bmp quality. Also the tiff file did not have a preview when opened with Windows Picture and Fax Viewer.

The other thing I noticed when playing with the draw region feature was that the Windows Screener GUI shows up (despite it having faded away) in the screenshot if the region includes the area the "invisible" GUI is located. I thought that was kind of odd.

Otherwise very cool stuff a person can do with autoit if they know what they are doing. I hope over time to be able to create some scripts I can get feedback on.

BMP and PNG's quality is suppose to be better than JPG, if you noticed them in the file size, which BMP is generally 2MB+ and JPG is around 1MB max and sometimes 500 Kb(Full screen size), same for gif.

If you use Photoshop CS3, you can see tif file.

I didn't quite get your last one, but i suppose the program itself should show up in the screenshot. How do i know if you want to take a screenshot of it or not lol. If not then just minimize it.

Thanks for all the comments.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

Excellent...I've been looking for a good freeware screenshot taker (I've been using SnagIt for years but that's not freeware).

Just some quick first impressions:

You really need to add an option called 'Active Window'...this way, when I press F12 (or whatever hotkey I defined), the screen snaps that. Should be easy to do, you can use WinGetTitle("") to get the active window title. If I have to keep defining the window before I take a screenshot, it's too much work.

Also, how about an option to open the screenshot in an editor afterwards?

Great job so far.

BTW...your quality sliders are defaulting to 0% on first run.

Edited by sshrum

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

Excellent...I've been looking for a good freeware screenshot taker (I've been using SnagIt for years but that's not freeware).

Just some quick first impressions:

You really need to add an option called 'Active Window'...this way, when I press F12 (or whatever hotkey I defined), the screen snaps that. Should be easy to do, you can use WinGetTitle("") to get the active window title. If I have to keep defining the window before I take a screenshot, it's too much work.

Also, how about an option to open the screenshot in an editor afterwards?

Great job so far.

BTW...your quality sliders are defaulting to 0% on first run.

Thanks for the input and i will try to get that fitted in.

Share this post


Link to post
Share on other sites

Another idea...there really is no need for a taskbar instance. You can define the app run to be just a Systray icon (I'd run this thing in the background all the time so I don't need a taskbar instance displayed all the time...it's just one more thing on the taskbar I'd just have to work around). Set it up with a pop-up menu to access the dialog and/or exit the app.

If you need help with this, let me know and I'll try to help out.


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

Another idea...there really is no need for a taskbar instance. You can define the app run to be just a Systray icon (I'd run this thing in the background all the time so I don't need a taskbar instance displayed all the time...it's just one more thing on the taskbar I'd just have to work around). Set it up with a pop-up menu to access the dialog and/or exit the app.

If you need help with this, let me know and I'll try to help out.

Well if you really want to you can change to other style to suit your needs, my major problem is to suit all the controls on the GUI and look nice. :whistle:

Edit: Typo

Edit 2: Forgot to mention if you didn't find out, just use Ctrl+Left click to get the program title, shouldn't be that annoying. But i will add in once i find out how to suit the GUI.

Edited by Generator

Share this post


Link to post
Share on other sites

BMP and PNG's quality is suppose to be better than JPG, if you noticed them in the file size, which BMP is generally 2MB+ and JPG is around 1MB max and sometimes 500 Kb(Full screen size), same for gif.

If you use Photoshop CS3, you can see tif file.

I didn't quite get your last one, but i suppose the program itself should show up in the screenshot. How do i know if you want to take a screenshot of it or not lol. If not then just minimize it.

Thanks for all the comments.

About Photoshop CS3, yeah it's a great program for just under $200.00 USD. I just thought it was odd that the tiff image I created with Windows Screener had no preview in Microsoft Picture and Fax Viewer; which is capable of viewing JPG, BMP, PNG, GIF, WMF, EMF and TIFF format files and is free with Windows XP.

My last point was mainly pointing out that in my opinion a screen capture program should capture what you actually see on your screen. And since Windows Screener fades out of sight, I was surprised to see the GUI in the screen shot when it wasn't visible to the human eye. Many programs offer the choice of including the mouse in the screen capture, maybe this could be applied to the mouse and GUI for Windows Screener.

Again nice job on your script, I'm sure I'll be using some of your "how to" in the future. Keep up the good work and thanks for the reply.

...

Share this post


Link to post
Share on other sites

About Photoshop CS3, yeah it's a great program for just under $200.00 USD. I just thought it was odd that the tiff image I created with Windows Screener had no preview in Microsoft Picture and Fax Viewer; which is capable of viewing JPG, BMP, PNG, GIF, WMF, EMF and TIFF format files and is free with Windows XP.

My last point was mainly pointing out that in my opinion a screen capture program should capture what you actually see on your screen. And since Windows Screener fades out of sight, I was surprised to see the GUI in the screen shot when it wasn't visible to the human eye. Many programs offer the choice of including the mouse in the screen capture, maybe this could be applied to the mouse and GUI for Windows Screener.

Again nice job on your script, I'm sure I'll be using some of your "how to" in the future. Keep up the good work and thanks for the reply.

...

Updated.

Also i realized a problem, you have to set TIFF color depth if you want to see it with Windows Viewer, like 24 or 32.

Share this post


Link to post
Share on other sites

Really good project Generator.

The main thing I would like is that when you want a rectangular area selected then it should be drawn after you press the hotkey, and you should be able to see the rectangle so you can actually capture the area you want. When you've finished drawing the rectangle press Enter to capture the area.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

Really good project Generator.

The main thing I would like is that when you want a rectangular area selected then it should be drawn after you press the hotkey, and you should be able to see the rectangle so you can actually capture the area you want. When you've finished drawing the rectangle press Enter to capture the area.

Personally i will just stick with the way it is, if you drew wrong place just redraw. As you said, if you can tell me a way to get those mouse pos i would like to add that in.

Thanks for the comment

Edited by Generator

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0