Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/08/2022 in all areas

  1. Hi Mbee, Concerning the moving/resizing part of any visible window, @jaberwacky did a great job using _WinAPI_SetWinEventHook() in his last post of this thread. It allows to be noticed "live" while any window is being moved or resized. It's fun to run his script from Scite, then resizing/moving the Scite Window while looking at AutoIt Console. You can also add other events in his function _EventProc() , for example if you want to be noticed if any window is minimized or restored etc... Func _EventProc($hEventHook, $iEvent, $hWnd, $iObjectID, $iChildID, $iThreadId, $iEventTime) Switch $iEvent Case $EVENT_SYSTEM_MOVESIZESTART ConsoleWrite("Start : a window is being moved or resized" & @CRLF) Case $EVENT_SYSTEM_MOVESIZEEND ConsoleWrite("End : the movement or resizing of a window has finished" & @CRLF) Case $EVENT_SYSTEM_MINIMIZESTART ConsoleWrite("Start : A window object is about to be minimized" & @CRLF) Case $EVENT_SYSTEM_MINIMIZEEND ConsoleWrite("End : A window object is about to be restored" & @CRLF) EndSwitch EndFunc List of possible events in this msdn link
    1 point
  2. read https://answers.sap.com/questions/13463181/crystal-report-error-database-vendor-code-18456-fo.html
    1 point
  3. Ok! Yes. I think this will work. Thank you everybody. #include <APISysConstants.au3> #include <GUIMenu.au3> #include <WinAPIProc.au3> #include <WinAPISys.au3> #include <WindowsConstants.au3> Global $hEventProc = DllCallbackRegister(_EventProc, "none", "ptr;dword;hwnd;long;long;dword;dword") Global $hEventHook = _WinAPI_SetWinEventHook($EVENT_MIN, $EVENT_MAX, DllCallbackGetPtr($hEventProc)) OnAutoItExitRegister(OnAutoItExit) Global $iPid = Run(@SystemDir & "\notepad.exe") While ProcessExists($iPid) Sleep(1000) WEnd Func OnAutoItExit() _WinAPI_UnhookWinEvent($hEventHook) DllCallbackFree($hEventProc) EndFunc Func _EventProc($hEventHook, $iEvent, $hWnd, $iObjectID, $iChildID, $iThreadId, $iEventTime) #forceref $hEventHook, $iObjectID, $iChildID, $iThreadId, $iEventTime Switch $iEvent Case $EVENT_SYSTEM_MOVESIZEEND ConsoleWrite("End" & @CRLF) Case $EVENT_SYSTEM_MOVESIZESTART ConsoleWrite("Start" & @CRLF) EndSwitch EndFunc
    1 point
×
×
  • Create New...