Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Window Function
#1
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
Code:
Copy      Help
;/
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


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)