Jump to content

_AppMon() - Monitor all open instances of your application(s). This includes PID, hWnd and start time of the application.


guinness
 Share

Recommended Posts

This UDF was created to keep a list of all instances of your application, this includes PID, GUI handle (if added) and the start time of the application. It could be argued that why not use ProcessList('myProg.exe') to acquire basically the same information. Well what if a user changes the executable name?*

So please check out the example below and carefully read the headers on how to use the UDF.

* - >_SelfRename() could be used to avoid this issue.

UDF:

#include-once

; #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7
; #INDEX# =======================================================================================================================
; Title .........: _AppMon
; AutoIt Version : v3.3.2.0 or higher
; Language ......: English
; Description ...: Monitor all open instances of your application(s). This includes PID, hWnd and start time of the application.
; Note ..........:
; Author(s) .....: guinness
; ===============================================================================================================================

; #INCLUDES# ====================================================================================================================
#include <Constants.au3>

; #GLOBAL VARIABLES# ============================================================================================================
; None

; #CURRENT# =====================================================================================================================
; _AppMon_GetArray: Return an array of currently open applications.
; _AppMon_Shutdown: Remove the current application from the AppMon list. This is to be called when the application exits.
; _AppMon_Start: Add the current application to the AppMon list.
; ===============================================================================================================================

; #FUNCTION# ====================================================================================================================
; Name ..........: _AppMon_GetArray
; Description ...: Return an array of currently open applications.
; Syntax ........: _AppMon_GetArray(Const Byref $aAPI[, $fTimeString = Default])
; Parameters ....: $aAPI                - [in/out and const] API created by _AppMon_Start.
;                  $fTimeString         - [optional] Convert the program start time to YYYY/MM/DD HH:MM:SS. Default is False, YYYYMMDDHHMMSS.
; Return values .: Success - An array containing a list of folders.
;                  Failure - Blank array & sets @error to non-zero.
; Author ........: guinness
; Remarks........: The array returned is two-dimensional and is made up as follows:
;                                $aArray[0][0] = Number of applications
;                                $aArray[1][0] = PID
;                                $aArray[1][1] = hWnd of GUI (if previously set in _AppMon_Start.)
;                                $aArray[1][2] = Application start time string.
;                                ...
;                                $aArray[n][0] = PID
;                                $aArray[n][1] = hWnd of GUI (if previously set in _AppMon_Start.)
;                                $aArray[n][2] = Application start time string.
; Example .......: Yes
; ===============================================================================================================================
Func _AppMon_GetArray(ByRef Const $aAPI, $fTimeString = Default)
    Local Enum $sAPIOccurenceName, $sAPIGUID
    #forceref $sAPIOccurenceName

    Local $hWnd = WinGetHandle($aAPI[$sAPIGUID])
    Local $hControl = ControlGetHandle($hWnd, '', 'Edit1')
    Local $sData = ControlGetText($hWnd, '', $hControl)

    Local $aSRE = StringRegExp($sData, 'PID:(\d+)\|hWnd:(0x[[:xdigit:]]+)\|Time:(\d{14})\r\n', 3)
    If @error Then
        Local $aError[1][3] = [[0]]
        Return SetError(1, 0, $aError)
    EndIf

    Local $iUBound = UBound($aSRE)
    Local $aReturn[($iUBound / 3) + 1][3] = [[0]]
    For $i = 0 To ($iUBound - 1) Step 3
        $aReturn[0][0] += 1
        $aReturn[$aReturn[0][0]][0] = Int($aSRE[$i])
        $aReturn[$aReturn[0][0]][1] = HWnd($aSRE[$i + 1])
        $aReturn[$aReturn[0][0]][2] = $aSRE[$i + 2]
        If $fTimeString Then
            $aReturn[$aReturn[0][0]][2] = StringRegExpReplace($aReturn[$aReturn[0][0]][2], '(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})', '\1/\2/\3 \4:\5:\6')
        EndIf
    Next
    Return $aReturn
EndFunc   ;==>_AppMon_GetArray

; #FUNCTION# ====================================================================================================================
; Name ..........: _AppMon_Shutdown
; Description ...: Remove the current application from the AppMon list. This is to be called when the application exits.
; Syntax ........: _AppMon_Shutdown(Const Byref $aAPI)
; Parameters ....: $aAPI                - [in/out and const] API created by _AppMon_Start.
; Return values .: Success - True
;                  Failure - False
; Author ........: guinness
; Example .......: Yes
; ===============================================================================================================================
Func _AppMon_Shutdown(ByRef Const $aAPI)
    Local Enum $sAPIOccurenceName, $sAPIGUID

    Local $hWnd = WinGetHandle($aAPI[$sAPIGUID])
    Local $hControl = ControlGetHandle($hWnd, '', 'Edit1')
    Local $sData = ControlGetText($hWnd, '', $hControl)

    Local $sReplacement = StringRegExpReplace($sData, 'PID:' & @AutoItPID & '\|hWnd:0x[[:xdigit:]]+\|Time:\d{14}\r\n', '')
    If @extended Then
        $sData = $sReplacement
        $sReplacement = ''
        If AutoItWinGetTitle() == $aAPI[$sAPIGUID] Then
            Local $aPID = StringRegExp($sData, 'PID:(\d+)\|hWnd:0x[[:xdigit:]]+\|Time:\d{14}\r\n', 3), $iPID = 0
            If @error = 0 Then
                $iPID = Int($aPID[0])
            EndIf
            Local $aWinList = WinList('[TITLE:' & $aAPI[$sAPIOccurenceName] & '; CLASS:AutoIt v3]')
            For $i = 1 To $aWinList[0][0]
                If $iPID = WinGetProcess($aWinList[$i][1]) Then
                    $hWnd = $aWinList[$i][1]
                    $hControl = ControlGetHandle($hWnd, '', 'Edit1')
                    WinSetTitle($hWnd, '', $aAPI[$sAPIGUID])
                    ExitLoop
                EndIf
            Next
        EndIf
        ControlSetText($hWnd, '', $hControl, $sData)
        Return True
    EndIf
    Return False
EndFunc   ;==>_AppMon_Shutdown

; #FUNCTION# ====================================================================================================================
; Name ..........: _AppMon_Start
; Description ...: Add the current application to the AppMon list.
; Syntax ........: _AppMon_Start([$sOccurenceName = Default[, $hGUI = Default]])
; Parameters ....: $sOccurenceName      - [optional] $sOccurenceName      - [optional] String to identify the occurrence of the script with the unique id. Default is {C1CE8F2E-CC97-11E2-AA40-55F011C84021}.
;                  $hGUI                - [optional] A valid GUI handle. Default is 0x0000000000000000 (no handle.)
; Return values .: API to be passed to relevant functions.
; Author ........: guinness
; Example .......: Yes
; ===============================================================================================================================
Func _AppMon_Start($sOccurenceName = Default, $hGUI = Default)
    Local Enum $sAPIOccurenceName, $sAPIGUID
    Local $aAPI[2]

    $aAPI[$sAPIOccurenceName] = $sOccurenceName
    $sOccurenceName = ''

    If $aAPI[$sAPIOccurenceName] = Default Then
        $aAPI[$sAPIOccurenceName] = '{C1CE8F2E-CC97-11E2-AA40-55F011C84021}'
    EndIf
    $aAPI[$sAPIOccurenceName] = StringStripWS($aAPI[$sAPIOccurenceName], $STR_STRIPALL)
    $aAPI[$sAPIGUID] = '__AppMon__' & $aAPI[$sAPIOccurenceName]
    Local $hWnd = WinGetHandle($aAPI[$sAPIGUID])
    If @error Then
        AutoItWinSetTitle($aAPI[$sAPIGUID])
        $hWnd = WinGetHandle($aAPI[$sAPIGUID])
    Else
        AutoItWinSetTitle($aAPI[$sAPIOccurenceName])
    EndIf

    Local $hControl = ControlGetHandle($hWnd, '', 'Edit1')
    Local $sData = ControlGetText($hWnd, '', $hControl)

    If IsHWnd($hGUI) = 0 Then
        $hGUI = '0x0000000000000000'
    EndIf
    $sData &= 'PID:' & @AutoItPID & '|hWnd:' & $hGUI & '|Time:' & @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @CRLF
    ControlSetText($hWnd, '', $hControl, $sData)
    Return $aAPI
EndFunc   ;==>_AppMon_Start
Example 1:

#include <Array.au3>
#include <GUIConstantsEx.au3>

#include '_AppMon.au3'

Example()

Func Example()
    Local $hGUI = GUICreate('', 400, 300, Random(0, @DesktopWidth - 400, 1), Random(0, @DesktopHeight - 350, 1))

    Local $iLabel = GUICtrlCreateLabel('', 5, 5, 390, 20)
    Local $iCloseAll = GUICtrlCreateCheckbox('Close all instances.', 5, 272.5)
    GUICtrlSetState($iCloseAll, $GUI_CHECKED)

    Local $iAppMon = GUICtrlCreateButton('AppMon', 130, 270, 85, 25)
    Local $iRun = GUICtrlCreateButton('Run', 220, 270, 85, 25)
    Local $iClose = GUICtrlCreateButton('Close', 310, 270, 85, 25)
    GUISetState(@SW_SHOW, $hGUI)

    ; Add the current application to the AppMon list.
    Local $hAppMon = _AppMon_Start('SingletonExample', $hGUI)

    ; Get an array of the currently open applications.
    Local $aAppMon = _AppMon_GetArray($hAppMon, True)
    For $i = 1 To $aAppMon[0][0]
        ; If the AutoIt PID of the current applications matches the same as the array item, then set the GUI title and label.
        If @AutoItPID == $aAppMon[$i][0] Then
            WinSetTitle($hGUI, '', '[' & $i & ' of ' & $aAppMon[0][0] & '] - PID: ' & @AutoItPID)
            GUICtrlSetData($iLabel, 'Application started: ' & $aAppMon[$i][2]) ; Time string.
            ExitLoop
        EndIf
    Next

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $iClose
                ExitLoop

            Case $iAppMon
                $aAppMon = _AppMon_GetArray($hAppMon)
                _ArrayDisplay($aAppMon)

            Case $iRun
                If @Compiled Then
                    Run(@ScriptFullPath, @WorkingDir)
                Else
                    Run(@AutoItExe & ' "' & @ScriptFullPath & '"', @WorkingDir)
                EndIf

        EndSwitch
    WEnd

    ; Close all open applications if the checkbox is selected to do so.
    If BitAND(GUICtrlRead($iCloseAll), $GUI_CHECKED) = $GUI_CHECKED Then
        $aAppMon = _AppMon_GetArray($hAppMon)
        For $i = 1 To $aAppMon[0][0]
            ; So as not to inadvertently close the current application before tidying up.
            If @AutoItPID == $aAppMon[$i][0] Then
                ContinueLoop
            EndIf
            ; Close the GUI handles.
            If WinExists($aAppMon[$i][1]) Then
                WinClose($aAppMon[$i][1])
            EndIf
        Next
    EndIf

    ; Delete the GUI.
    GUIDelete($hGUI)

    ; Remove from the AppMon list.
    _AppMon_Shutdown($hAppMon)
EndFunc   ;==>Example
Example 2:

#include <Constants.au3>
#include <GUIConstantsEx.au3>

#include '_AppMon.au3'

Example()

Func Example()
    Local $hGUI = GUICreate('', 400, 300, Random(0, @DesktopWidth - 400, 1), Random(0, @DesktopHeight - 350, 1))

    Local $iCloseAll = GUICtrlCreateCheckbox('Close all instances.', 5, 272.5)
    GUICtrlSetState($iCloseAll, $GUI_CHECKED)

    Local $iRun = GUICtrlCreateButton('Run', 220, 270, 85, 25)
    Local $iClose = GUICtrlCreateButton('Close', 310, 270, 85, 25)
    GUISetState(@SW_SHOW, $hGUI)

    ; Array of the currently open applications.
    Local $aAppMon = 0

    ; Add the current application to the AppMon list.
    Local $hAppMon = _AppMon_Start('SingletonExample', $hGUI)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE, $iClose
                ExitLoop

            Case $iRun
                $aAppMon = _AppMon_GetArray($hAppMon)

                ; Allow only 2 instances of an application to be executed.
                If $aAppMon[0][0] = 2 Then
                    MsgBox($MB_SYSTEMMODAL, '', 'Total number of concurrent running applications has been reached.', 0, $hGUI)
                Else
                    If @Compiled Then
                        Run(@ScriptFullPath, @WorkingDir)
                    Else
                        Run(@AutoItExe & ' "' & @ScriptFullPath & '"', @WorkingDir)
                    EndIf
                EndIf
        EndSwitch
    WEnd

    ; Close all open applications if the checkbox is selected to do so.
    If BitAND(GUICtrlRead($iCloseAll), $GUI_CHECKED) = $GUI_CHECKED Then
        $aAppMon = _AppMon_GetArray($hAppMon)
        For $i = 1 To $aAppMon[0][0]
            ; So as not to inadvertently close the current application before tidying up.
            If @AutoItPID == $aAppMon[$i][0] Then
                ContinueLoop
            EndIf
            ; Close the GUI handles.
            If WinExists($aAppMon[$i][1]) Then
                WinClose($aAppMon[$i][1])
            EndIf
        Next
    EndIf

    ; Delete the GUI.
    GUIDelete($hGUI)

    ; Remove from the AppMon list.
    _AppMon_Shutdown($hAppMon)
EndFunc   ;==>Example
All of the above has been included in a ZIP file. AppMon.zip

Previous download 75+.

Edited by guinness

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Added an additional second example to show how to limit your application to only 2 instances.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Hello, good job man! Not of any use for me, at the moment, but may be for someone. This is a post to congratulate for the great job, and for you to stop saying you have topics were you don't even got a (one) reply. :)

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Hello, good job man! Not of any use for me, at the moment, but may be for someone. This is a post to congratulate for the great job, and for you to stop saying you have topics were you don't even got a (one) reply. :)

Thanks. I was making a point that last time, I don't care if no one replies. That's a good sign.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • 5 months later...

I updated the examples and UDF by replacing 'magic numbers' with the available variable constant values. See first post for download and examples.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • 1 year later...

The UDF is now deprecated. Please see >AppMonEx for an up to date and manageable UDF.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...