Jump to content
Sign in to follow this  
FireFox

Simple capture tool for procedures

Recommended Posts

FireFox

Here is a simple capture tool, using the great Mark_Rect and _GUICreateInvRect functions by Melba23 (not sure if it's him, though).
 
It will capture a desired region and put the image in the clipboard, nothing else.
However, if you want it to save the capture, see post >#7

The purpose of this script is to paste your captures into Word (or any other advanced text editor) to make procedures.
 
I have added some extra features like tooltips to show current mouse pos and rect size.
I can add some others like drawing the capture time, on demand.
 
How to use it ?
Press "PrintScreen" or "Ctrl + Shift + 3" and voila.
 
NB :
It preserves the screen layout, meaning if you have for example opened a contextmenu this last will be still visible on your captured image; which is the main reason of why I made this script.
 
Requirements :
AutoIt v3.3.9.12+ (ternary operator)
 
Click for a preview :

IpYxbhn.jpg

; By FireFox, 2014
; Version : 1.4

#include <WindowsConstants.au3>
#include <Misc.au3>
#include <WinAPI.au3>
#include <ScreenCapture.au3>
#include <ClipBoard.au3>
#include <ColorConstants.au3>
#include <Constants.au3>

; Settings
Global $_fShowMousePos = True, $_fShowRectSize = True, $_fHideDesktop = False, $_fHideTaskBar = False

If HotKeySet("{PRINTSCREEN}", "Example") = 0 Then
    MsgBox($MB_SYSTEMMODAL, "", "Could not set the hotkey !")
    Exit 1
EndIf

HotKeySet("^+{3}", "Example") ;for Windows under a MacBook lacking of a PrintScreen key (yes... me)

While 1
    Sleep(10000) ;10 sec
WEnd

Func Example()
    Local $iX1 = 0, $iY1 = 0, $iX2 = 0, $iY2 = 0
    Local $hGUICapture = 0

    Mark_Rect($hGUICapture, $iX1, $iY1, $iX2, $iY2)

    Local $hBitmap = _ScreenCapture_CaptureWnd("", $hGUICapture, $iX1, $iY1, $iX2, $iY2, False)
    GUIDelete($hGUICapture)

    Local $fOpenCb = _ClipBoard_Open(0)
    If Not $fOpenCb Then
        MsgBox($MB_SYSTEMMODAL, "", "Could not open the clipboard !")
        Return False
    EndIf

    _ClipBoard_Empty()

    Local $hBitmap3 = _WinAPI_CopyImage($hBitmap, 0, 0, 0, BitOR($LR_COPYDELETEORG, $LR_COPYRETURNORG))
    _WinAPI_DeleteObject($hBitmap)

    _ClipBoard_SetDataEx($hBitmap3, $CF_BITMAP)
    _ClipBoard_Close()

    _WinAPI_DeleteObject($hBitmap3)
EndFunc   ;==>Example

Func Mark_Rect(ByRef $hGUICapture, ByRef $iX1, ByRef $iY1, ByRef $iX2, ByRef $iY2)
    Local $iX_Pos = 0, $iY_Pos = 0, $iTemp = 0, $iWidth = 0, $iHeight = 0
    Local $hMask_1 = 0

    Local $hWnd = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]")
    Local $aWgp = WinGetPos($hWnd)

    If $_fHideDesktop Then
        ControlHide($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]")
    EndIf

    If $_fHideTaskBar Then
        WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_HIDE)
        WinSetState("[CLASS:Button]", "", @SW_HIDE)
    EndIf

    Local $hBitmap = _ScreenCapture_Capture("", $aWgp[0], $aWgp[1], $aWgp[2], $aWgp[3])

    Local $aSize[2] = [$aWgp[2], $aWgp[3]]
    $aWgp = 0

    $hGUICapture = GUICreate("", $aSize[0], $aSize[1], 0, 0, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_APPWINDOW, $WS_EX_TOPMOST))
    GUISetCursor($IDC_CROSS, 1, $hGUICapture)

    If $giGDIPRef = 0 Then
        _GDIPlus_Startup()
    EndIf

    Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUICapture)

    Local $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap)
    _WinAPI_DeleteObject($hBitmap)

    WinSetTrans($hGUICapture, "", 0)

    GUISetState(@SW_SHOWNOACTIVATE, $hGUICapture)

    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)

    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_ImageDispose($hImage)

    If $giGDIPRef > 1 Then
        _GDIPlus_Shutdown()
    EndIf

    WinSetTrans($hGUICapture, "", 255)

    If $_fHideTaskBar Then
        WinSetState("[CLASS:Button]", "", @SW_SHOWNOACTIVATE)
        WinSetState("[CLASS:Shell_TrayWnd]", "", @SW_SHOWNOACTIVATE)
    EndIf

    If $_fHideDesktop Then
        ControlShow($hWnd, "", "[CLASS:SysListView32; INSTANCE:1]")
    EndIf

    Local $hGUIRect = GUICreate("", $aSize[0], $aSize[1], 0, 0, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    GUISetBkColor($COLOR_BLACK)
    GUISetCursor($IDC_CROSS, 1, $hGUIRect)

    _GUICreateInvRect($hGUIRect, $aSize, $hMask_1, 0, 0, 1, 1)

    WinSetTrans($hGUIRect, "", 75)
    GUISetState(@SW_SHOWNOACTIVATE, $hGUIRect)

    Local $hUserDLL = DllOpen("user32.dll")
    Local $aMgp = 0
    Local $fExitLoop = False

    ; Wait until mouse button pressed
    While Not _IsPressed("01", $hUserDLL) And Not $fExitLoop
        If $_fShowMousePos Then
            $aMgp = MouseGetPos()
            ToolTip("x: " & $aMgp[0] & ", y: " & $aMgp[1], _
                    $aMgp[0] + ($aMgp[0] > 100 ? -95 : 10), _
                    $aMgp[1] + ($aMgp[1] > 50 ? -35 : 10))
        EndIf

        Sleep(10)
        If _IsPressed("1B", $hUserDLL) Then $fExitLoop = True
    WEnd

    If $_fShowMousePos Then
        ToolTip("")
    EndIf

    ; Get first mouse position
    $aMgp = MouseGetPos()
    $iX1 = $aMgp[0]
    $iY1 = $aMgp[1]

    ; Draw rectangle while mouse button pressed
    While _IsPressed("01", $hUserDLL) And Not $fExitLoop
        $aMgp = MouseGetPos()

        ; Set in correct order if required
        If $aMgp[0] < $iX1 Then
            $iX_Pos = $aMgp[0]
            $iWidth = $iX1 - $aMgp[0]
        Else
            $iX_Pos = $iX1
            $iWidth = $aMgp[0] - $iX1
        EndIf
        If $aMgp[1] < $iY1 Then
            $iY_Pos = $aMgp[1]
            $iHeight = $iY1 - $aMgp[1]
        Else
            $iY_Pos = $iY1
            $iHeight = $aMgp[1] - $iY1
        EndIf

        _GUICreateInvRect($hGUIRect, $aSize, $hMask_1, $iX_Pos, $iY_Pos, $iWidth, $iHeight)

        If $_fShowRectSize Then
            ToolTip("w: " & Abs($aMgp[0] - $iX1) & ", h: " & Abs($aMgp[1] - $iY1), _
                    $aMgp[0] + ((($aMgp[0] > $aSize[0] - 100 Or ($aMgp[0] - $iX1 < 0 And $aMgp[1] - $iY1 < 0)) And $aMgp[0] > 100) ? -95 : 10), _
                    $aMgp[1] + ((($aMgp[1] > $aSize[1] - 40 Or ($aMgp[0] - $iX1 < 0 And $aMgp[1] - $iY1 < 0)) And $aMgp[1] > 40) ? -35 : 10))
        EndIf

        Sleep(10)
        If _IsPressed("1B", $hUserDLL) Then $fExitLoop = True
    WEnd

    If $_fShowRectSize Then
        ToolTip("")
    EndIf

    _WinAPI_DeleteObject($hMask_1)

    ; Get second mouse position
    $iX2 = $aMgp[0]
    $iY2 = $aMgp[1]

    ; Set in correct order if required
    If $iX2 < $iX1 Then
        $iTemp = $iX1
        $iX1 = $iX2
        $iX2 = $iTemp
    EndIf
    If $iY2 < $iY1 Then
        $iTemp = $iY1
        $iY1 = $iY2
        $iY2 = $iTemp
    EndIf

    GUIDelete($hGUIRect)
    DllClose($hUserDLL)
EndFunc   ;==>Mark_Rect

Func _GUICreateInvRect($hWnd, $aSize, ByRef $hMask_1, $iX, $iY, $iW, $iH)
    Local $hMask_2 = 0, $hMask_3 = 0, $hMask_4 = 0

    $hMask_1 = _WinAPI_CreateRectRgn(0, 0, $aSize[0], $iY)
    $hMask_2 = _WinAPI_CreateRectRgn(0, 0, $iX, $aSize[1])
    $hMask_3 = _WinAPI_CreateRectRgn($iX + $iW, 0, $aSize[0], $aSize[1])
    $hMask_4 = _WinAPI_CreateRectRgn(0, $iY + $iH, $aSize[0], $aSize[1])

    _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_2, 2)
    _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_3, 2)
    _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_4, 2)

    _WinAPI_DeleteObject($hMask_2)
    _WinAPI_DeleteObject($hMask_3)
    _WinAPI_DeleteObject($hMask_4)

    _WinAPI_SetWindowRgn($hWnd, $hMask_1, 1)
EndFunc   ;==>_GUICreateInvRect

Attached the same script as above. (Previous downloads : 47)

Br, FireFox.

Simple Capture tool.au3

Edited by FireFox
  • Like 2

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
ricky

Hello,

thanks to share, it works, but with a little bug. I have a dual screen and the right screen  turns white during the selection...

Share this post


Link to post
Share on other sites
UEZ

Cannot handle multi monitor. ;)

Use e.g. 

$hFullScreen = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]")
$aFullScreen = WinGetPos($hFullScreen)

to get screen size to capture appropriately.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
FireFox

Thanks for the suggestion, I have added the dual monitor support.

I have also improved the rect tooltip.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
this-is-me

Legend, get the latest autoit.


Who else would I be?

Share this post


Link to post
Share on other sites
legend

It's a pretty nice sample, and working very well, 

how would you save the picture to a file, as pic.png

Share this post


Link to post
Share on other sites
FireFox

It's a pretty nice sample, and working very well, 

how would you save the picture to a file, as pic.png

As written, it's not designed to save the picture to a file.

 

But you can replace the example function by this one :

Func Example()
    Local $iX1 = 0, $iY1 = 0, $iX2 = 0, $iY2 = 0
    Local $hGUICapt = 0
 
    Mark_Rect($hGUICapt, $iX1, $iY1, $iX2, $iY2)
 
    _ScreenCapture_CaptureWnd(@ScriptDir & "\Capture.png", $hGUICapt, $iX1, $iY1, $iX2, $iY2)
    GUIDelete($hGUICapt)
EndFunc   ;==>Example

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
mesale0077

; By FireFox, 2014
; Version : 1.1

#include <WindowsConstants.au3>
#include <Misc.au3>
#include <WinAPI.au3>
#include <ScreenCapture.au3>
#include <ClipBoard.au3>
#include <ColorConstants.au3>
#include <Constants.au3>

; Settings
Global $_fShowMousePos = True, $_fShowRectSize = True

HotKeySet("{PRINTSCREEN}", "Example")
HotKeySet("^+{3}", "Example") ;for Windows under a MacBook lacking of a PrintScreen key (yes... me)

While 1
    Sleep(10000) ;10 sec
WEnd
Func Example()
    Local $iX1 = 0, $iY1 = 0, $iX2 = 0, $iY2 = 0
    Local $hGUICapt = 0
 
    Mark_Rect($hGUICapt, $iX1, $iY1, $iX2, $iY2)
 
    _ScreenCapture_CaptureWnd(@ScriptDir & "\" &"capture.png", $hGUICapt, $iX1, $iY1, $iX2, $iY2)
    GUIDelete($hGUICapt)
EndFunc 
Func Example1()
    Local $iX1 = 0, $iY1 = 0, $iX2 = 0, $iY2 = 0
    Local $hGUICapt = 0

    Mark_Rect($hGUICapt, $iX1, $iY1, $iX2, $iY2)

    Local $hBitmap = _ScreenCapture_CaptureWnd("", $hGUICapt, $iX1, $iY1, $iX2, $iY2)
    GUIDelete($hGUICapt)

    _ClipBoard_Open(0)
    _ClipBoard_Empty()

    Local $hBitmap3 = _WinAPI_CopyImage($hBitmap, 0, 0, 0, $LR_COPYDELETEORG + $LR_COPYRETURNORG)
    _WinAPI_DeleteObject($hBitmap)

    _ClipBoard_SetDataEx($hBitmap3, $CF_BITMAP)
    _ClipBoard_Close()

    _WinAPI_DeleteObject($hBitmap3)
    
EndFunc   ;==>Example

Func Mark_Rect(ByRef $hGUICapt, ByRef $iX1, ByRef $iY1, ByRef $iX2, ByRef $iY2)
    Local $iX_Pos = 0, $iY_Pos = 0, $iTemp = 0, $iWidth = 0, $iHeight = 0
    Local $hMask_1 = 0

    Local $hWnd = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]")
    Local $aWgp = WinGetPos($hWnd)

    Local $hBitmap = _ScreenCapture_Capture("", $aWgp[0], $aWgp[1], $aWgp[2], $aWgp[3])

    $hGUICapt = GUICreate("", $aWgp[2], $aWgp[3], 0, 0, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    GUISetCursor($IDC_CROSS, 1, $hGUICapt)
    WinSetTrans($hGUICapt, "", 0)

    If $giGDIPRef = 0 Then
        _GDIPlus_Startup()
    EndIf

    Local $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUICapt)

    Local $hImage = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap)
    _WinAPI_DeleteObject($hBitmap)

    GUISetState(@SW_SHOWNOACTIVATE, $hGUICapt)

    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, 0, 0)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_ImageDispose($hImage)

    If $giGDIPRef > 1 Then
        _GDIPlus_Shutdown()
    EndIf

    WinSetTrans($hGUICapt, "", 255)

    Local $hRectangle_GUI = GUICreate("", $aWgp[2], $aWgp[3], 0, 0, $WS_POPUP, BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    GUISetBkColor($COLOR_BLACK)
    GUISetCursor($IDC_CROSS, 1, $hRectangle_GUI)

    _GUICreateInvRect($hRectangle_GUI, $hMask_1, 0, 0, 1, 1)

    WinSetTrans($hRectangle_GUI, "", 75)
    GUISetState(@SW_SHOWNOACTIVATE, $hRectangle_GUI)

    Local $hUserDLL = DllOpen("user32.dll")
    Local $aMgp = 0
    Local $fExitLoop = False

    ; Wait until mouse button pressed
    While Not _IsPressed("01", $hUserDLL) And Not $fExitLoop
        If $_fShowMousePos Then
            $aMgp = MouseGetPos()
            ToolTip("x: " & $aMgp[0] & ", y: " & $aMgp[1], _
                    $aMgp[0] + ($aMgp[0] > 100 ? -95 : 10), _
                    $aMgp[1] + ($aMgp[1] > 50 ? -35 : 10))
        EndIf

        Sleep(10)
        If _IsPressed("1B", $hUserDLL) Then $fExitLoop = True
    WEnd

    If $_fShowMousePos Then
        ToolTip("")
    EndIf

    ; Get first mouse position
    $aMgp = MouseGetPos()
    $iX1 = $aMgp[0]
    $iY1 = $aMgp[1]

    ; Draw rectangle while mouse button pressed
    While _IsPressed("01", $hUserDLL) And Not $fExitLoop
        $aMgp = MouseGetPos()

        ; Set in correct order if required
        If $aMgp[0] < $iX1 Then
            $iX_Pos = $aMgp[0]
            $iWidth = $iX1 - $aMgp[0]
        Else
            $iX_Pos = $iX1
            $iWidth = $aMgp[0] - $iX1
        EndIf
        If $aMgp[1] < $iY1 Then
            $iY_Pos = $aMgp[1]
            $iHeight = $iY1 - $aMgp[1]
        Else
            $iY_Pos = $iY1
            $iHeight = $aMgp[1] - $iY1
        EndIf

        _GUICreateInvRect($hRectangle_GUI, $hMask_1, $iX_Pos, $iY_Pos, $iWidth, $iHeight)

        If $_fShowRectSize Then
            ToolTip("w: " & $aMgp[0] - $iX1 & ", h: " & $aMgp[1] - $iY1, _
                    $aMgp[0] + ((($aMgp[0] > $aWgp[2] - 100 Or ($aMgp[0] - $iX1 < 0 And $aMgp[1] - $iY1 < 0)) And $aMgp[0] > 100) ? -95 : 10), _
                    $aMgp[1] + ((($aMgp[1] > $aWgp[3] - 40 Or ($aMgp[0] - $iX1 < 0 And $aMgp[1] - $iY1 < 0)) And $aMgp[1] > 40) ? -35 : 10))
        EndIf

        Sleep(10)
        If _IsPressed("1B", $hUserDLL) Then $fExitLoop = True
    WEnd

    If $_fShowRectSize Then
        ToolTip("")
    EndIf

    _WinAPI_DeleteObject($hMask_1)

    ; Get second mouse position
    $iX2 = $aMgp[0]
    $iY2 = $aMgp[1]

    ; Set in correct order if required
    If $iX2 < $iX1 Then
        $iTemp = $iX1
        $iX1 = $iX2
        $iX2 = $iTemp
    EndIf
    If $iY2 < $iY1 Then
        $iTemp = $iY1
        $iY1 = $iY2
        $iY2 = $iTemp
    EndIf

    GUIDelete($hRectangle_GUI)
    DllClose($hUserDLL)
EndFunc   ;==>Mark_Rect

Func _GUICreateInvRect($hWnd, ByRef $hMask_1, $iX, $iY, $iW, $iH)
    Local $hMask_2 = 0, $hMask_3 = 0, $hMask_4 = 0

    $hMask_1 = _WinAPI_CreateRectRgn(0, 0, @DesktopWidth * 3, $iY)
    $hMask_2 = _WinAPI_CreateRectRgn(0, 0, $iX, @DesktopHeight * 3)
    $hMask_3 = _WinAPI_CreateRectRgn($iX + $iW, 0, @DesktopWidth * 3, @DesktopHeight * 3)
    $hMask_4 = _WinAPI_CreateRectRgn(0, $iY + $iH, @DesktopWidth * 3, @DesktopHeight * 3)

    _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_2, 2)
    _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_3, 2)
    _WinAPI_CombineRgn($hMask_1, $hMask_1, $hMask_4, 2)

    _WinAPI_DeleteObject($hMask_2)
    _WinAPI_DeleteObject($hMask_3)
    _WinAPI_DeleteObject($hMask_4)

    _WinAPI_SetWindowRgn($hWnd, $hMask_1, 1)
EndFunc   ;==>_GUICreateInvRect

nice but,

save the picture to a file, as pic.png

dont work autoit version 3.3.10.2

Func Example()
    Local $iX1 = 0, $iY1 = 0, $iX2 = 0, $iY2 = 0
    Local $hGUICapt = 0
 
    Mark_Rect($hGUICapt, $iX1, $iY1, $iX2, $iY2)
 
    _ScreenCapture_CaptureWnd("capture.png", $hGUICapt, $iX1, $iY1, $iX2, $iY2)
    GUIDelete($hGUICapt)
EndFunc
Edited by mesale0077

Share this post


Link to post
Share on other sites
FireFox

It does work for me.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
mesale0077

okey worked ,thank you,

Share this post


Link to post
Share on other sites
ricky

Thnanks for the modification to accept the dual monitor.

But when I press "PrtSC" the image on my screen is moved 11px down, why?

Share this post


Link to post
Share on other sites
FireFox

But when I press "PrtSC" the image on my screen is moved 11px down, why?

I don't know. Try to see what's wrong.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

I added some error checking and two settings : show/hide taskbar or desktop.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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  

  • Similar Content

    • WoodGrain
      By WoodGrain
      Hi guys,
       
      I've written a script that will move my mouse to a location on the screen whenever my remote access software becomes active, the problem I have is that as soon as the remote access software becomes active it appears to capture the mouse and keyboard so nothing happens when I use MouseMove().
       
      Is there any way around this?
       
      Thanks!
    • nacerbaaziz
      By nacerbaaziz
      Hi dear
      I have a request
      I want a simplified example of how to create the toolbar
      With an example of pressing the buttons inside this bar
      for example
      Toolbar contains Three buttons
      open, save, And delete
      and i want  If i press a button from among these buttons a MSGBox appears
      I know this is easy
      But I did not know how to do it
      I hope you help me
      I apologize for the inconvenience
      Thank you in advance
    • Errious
      By Errious
      Hello,
      i am searching for a function that allows me some very specific functions for Screen Captures.
       
      First should be the possibillity to create a Screenshot from a specific window and this is possibly under another window but has to stay there and not getting forced to be in the first - layer position if this is clear enough :-) The other thing should be the ability to create a Screen Capture every couple minutes or a specific period.  
      I tried a lot of Screen Capture tools but neither can do both together.
      Also my try to create my own script with AutoIT failed, because of missing knoweledge about how to use it for this specific reasons, would be very kind if someone can tell me in the first place if this is possible at all and maybe someone has allready an idea about how to realize it?
       
      best regards
       
       
       
       
    • okolaris
      By okolaris
      Hey everyone,
      I thought I might share my little Language UDF plus the more powerful SciTE Tool to ship Strings from SciTE into the xml file. While I haven't had the time to fully adapt the small UDF to one of the big XML-UDFs the so called "Language Transmitter" that basically writes the XML file for you runs mostly on "XML DOM wrapper (COM)" by eltorro. The Transmitter should work with other XML-Language-UDFs depending on their encoding.
       
      First let's start with the UDF, there are two functions of interest: _LangInit($sFilePath) and s($sString) As you will have guessed, _LangInit($sFilePath) is called once to initialize the UDF and s($sString) is used to receive the string to your key. Plain and simple.
      Now to the actual "new" part, the Language Transmitter. It basically allows you to transfer a selected String from SciTE into a xml file. While doing so it will scan for AutoIt variables, macros etc. and parse the string to fit StringFormat(). It then saves the formatted string in the xml file and returns the formatted call into SciTE. If the selected string is already defined it will directly parse the key into SciTE. To change the default output file, you can either edit the ini-file in the @ScriptDir of the LanguageTransmitter.exe or press Alt+A on empty space again and keep clicking cancel/no until the Transmitter let's you select the current output file. Standard output is strings.xml in the current opened AutoIt Script.
      Example:
      ; given the line: MsgBox(16, 'Error', 'Error message') ; select 'Error' run the Transmitter follow the instructions, repeat with 'Error message'. Outcome (e.g.): MsgBox(16, s('Error'), s('Error_msg')) ; Variables and Macro example: $sString = "Value: " & $iValue & @CRLF & 'Another value: '& $iValue2 ; Select the full string including all AutoIt variables and macros etc. in SciTE and press Alt+A (default) to run the LanguageTransmitter ; follow the instructions and it will then paste a formatted string like that into SciTE: $sVar = StringFormat(s('Key'), $iValue, $iValue2) ; the correlating xml entry should look like that: ; <string name="Key">Value: %s\r\nAnother value: %s</string> ; as you can see @CRLF has been replaced with \r\n as well. If you are working on a project and want to directly add a string to the xml file just start the Language Transmitter without selecting any text, enter your string and a key.
      SetUp/Installation
      Examples
      Since xml files are required all examples can be found in the zip file. There are two examples, one includes a language selection interface.
      Language File Checker
      I added a script to check whether the xml file contains all required strings or even unnecessary strings.
       
      Hope you like my little helper!
       
      UDF - LanguageSupport.zip
    • UEZ
      By UEZ
      Here a small tool I wrote to update my Sysinternal tools collection without the need to download always the whole package or visiting the site to check for updates. I know that there are several tools available (also some tools written in AutoIt) but here another one for the collection. It was good exercise for me to code it.
       
       
        
       
       
      Some files from cannot be downloaded although they are visible on the web site!
       
      Here the download link of the source code only: AutoIt Sysinternal Tools Synchronizer v0.99.1 build 2017-10-23 beta.7z  (1353 downloads previously)
      -=> Requires AutoIt version 3.3.13.20 or higher / tested on Win8.1 real machine and some VMs: Win7 / Vista / Win10
       
      Compiled exe only: @MediaFire
       
      Just select the Sysinternal Tools folder or create one and press the synchronize button to download the selected items. Click on AutoIt label (near to left upper corner) to open menu.
       
      Special thanks to LarsJ, Melba23 and mesale0077 for their help. 
       
      I've still some ideas to implement which are more gimmick related, so it is not finished yet...
      If you want to add your language please check out #Region Language. Thanks. 
       
      Please report any bug or if you have any suggestions.
       
      The language of the tool tip from each of the executable in the left list view were automatically created using Google translator and weren't checked for correctness.
       
      Br,
      UEZ
×