05-10-2013, 12:23 AM
Hello,
Is it possible to modify the GetWindow function so that when the shift key is pressed on the window of choice it returns the Window Name rather than the handle?
Kind Regards
Matt
Function getWindow
Is it possible to modify the GetWindow function so that when the shift key is pressed on the window of choice it returns the Window Name rather than the handle?
Kind Regards
Matt
Function getWindow
;/
function# int&w [RECT&r]
;Allows the user to capture handle of a window or control in screen, and optionally a rectangle in it.
;Returns:
;;;0 not captured. User pressed Esc. w and r not changed.
;;;1 captured only window.
;;;2 captured window and rectangle.
;w - variable that receives window handle.
;r - variable that receives rectangle in the window, in client coordinates. Optional.
;REMARKS
;User selects the window with mouse and Shift.
;Added in: QM 2.3.4.
if(&r) _s="[]You can Shift+move mouse to draw rectangle."
OnScreenDisplay F"Move mouse to a window or control, and press Shift.{_s}" -1 0 0 "" 12 0x800000 5|8 "CWAR"
int R=__CaptureWindowAndRect(w r)
OsdHide "CWAR"
ret R