Jump to content

Search the Community

Showing results for tags 'pid creation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. An example of monitoring when windows are created, closed or re-drawn. I just noticed there is an example (similar to mine) in the AutoIt beta v3.3.9.6+, though the more examples there are the better understanding users will have. #include <GUIConstantsEx.au3> #include <WinAPIEx.au3> Example() Func Example() Local $hGUI = GUICreate('An(other) example by guinness - 2013', Default, Default) ; Create a GUI. GUISetState(@SW_SHOW, $hGUI) GUIRegisterMsg(_WinAPI_RegisterWindowMessage('SHELLHOOK'), 'WM_SHELLHOOK') ; Define a window message and assign to the WM_SHELLHOOK function. _WinAPI_RegisterShellHookWindow($hGUI) ; Register the shell hook message to our GUI. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd _WinAPI_DeregisterShellHookWindow($hGUI) GUIDelete($hGUI) EndFunc ;==>Example Func WM_SHELLHOOK($hWnd, $iMsg, $wParam, $lParam) #forceref $iMsg Switch $wParam Case $HSHELL_GETMINRECT ConsoleWrite('Minimised/Maximised: ' & @CRLF & _ @TAB & 'PID: ' & WinGetProcess($lParam) & @CRLF & _ ; This is the PID. @TAB & 'Filename: ' & _WinAPI_GetWindowFileName($lParam) & @CRLF & _ ; This is the filepath of the window. @TAB & 'hWnd: ' & $lParam & @CRLF) ; This will be the handle of the window closed. Case $HSHELL_REDRAW ConsoleWrite('Redrawn: ' & @CRLF & _ @TAB & 'PID: ' & WinGetProcess($lParam) & @CRLF & _ ; This is the PID. @TAB & 'Filename: ' & _WinAPI_GetWindowFileName($lParam) & @CRLF & _ ; This is the filepath of the window. @TAB & 'hWnd: ' & $lParam & @CRLF) ; This will be the handle of the window closed. Case $HSHELL_WINDOWCREATED ConsoleWrite('Created: ' & @CRLF & _ @TAB & 'PID: ' & WinGetProcess($lParam) & @CRLF & _ ; This is the PID. @TAB & 'Filename: ' & _WinAPI_GetWindowFileName($lParam) & @CRLF & _ ; This is the filepath of the window. @TAB & 'hWnd: ' & $lParam & @CRLF) ; This will be the handle of the window closed. Case $HSHELL_WINDOWDESTROYED ConsoleWrite('Destroyed: ' & @CRLF & _ @TAB & 'PID: ' & WinGetProcess($lParam) & @CRLF & _ ; This will be -1. @TAB & 'Filename: ' & _WinAPI_GetWindowFileName($lParam) & @CRLF & _ ; This will be empty. @TAB & 'hWnd: ' & $lParam & @CRLF) ; This will be the handle of the window closed. Case $HSHELL_WINDOWREPLACED ConsoleWrite('Replaced: ' & @CRLF & _ @TAB & 'PID: ' & WinGetProcess($lParam) & @CRLF & _ ; This is the PID. @TAB & 'Filename: ' & _WinAPI_GetWindowFileName($lParam) & @CRLF & _ ; This is the filepath of the window. @TAB & 'hWnd: ' & $lParam & @CRLF) ; This will be the handle of the window closed. EndSwitch EndFunc ;==>WM_SHELLHOOK
×
×
  • Create New...