Creates a window specification from the window handle.
cWndGetWndSpecName( window-handle )
(i) window-handle window handle of top-level window to create specification for.
(s) window-specification specification of indicated window.
This function is very similar to the function cWndGetWndSpec. The difference lies in the contents of the windows specification; cWndGetWndSpecName uses the window’s title instead of the window’s class name. This is useful in cases were an application window has a different class name every time it is created.
Like cWndGetWndSpec, cWndGetWndSpecName is used as a script development tool for creating a window specification from the window handle you supply.
Instead of using cWndByWndSpec, you must use cWndByWndSpecName to obtain a window handle from a window specification generated by this function.
The function’s parameter must be the window handle to an existing top-level window. A top-level window is any window that does not have the WS_CHILD style and is usually the main window of an application. The function will generate an error if the passed in window handle is not to a top-level window.
The window specification consists (in order) of the window’s title, module name, number of child windows and child window ids. Specification elements are separated by comas (,). The module name is the name of the executable or DLL file that is responsible for the window. It does not include the file name’s path or extension. Both the title and module name are surrounded by double quotes ("). There is a limit of 13 child windows allowed. You can obtain the window specification of a window with more than 13 child windows but only the first thirteen will be included in the specification.
UAC Notes: attempting to query information about an elevated process may cause the function to error when executed from a restricted user account.
AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
; Find Notepad's Windows handle hwnd = DllHwnd("~Notepad") ; Get the window specification. Spec = cWndGetWndSpecName (hwnd) ; Get the handle by the window specification. hWndSpec = cWndByWndSpecName(%Spec%) ; Make sure the result matches the original handle If hwnd == hWndSpec Then Message("Window Spec is correct", Spec) Else Message("Window Spec is NOT correct", Spec) Exit
cWndByWndSpecName, cWndByWndSpec, cWndGetWndSpec, cWndByName