Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check text area content of a child window
#12
Function DebugShowRectangle
Code:
Copy      Help
;/
function RECT'r hwnd [double'timeS] [flags] ;;flags: 1 not client area

;Shows a rectangle relative to a window or control.
;By default, relative to the client area.

;r - rectangle.
;hwnd - window/control handle.
;timeS - time in seconds. Default 2.


if hwnd
,if(flags&1) RECT k; GetWindowRect hwnd &k; OffsetRect &r k.left k.top
,else MapWindowPoints hwnd 0 +&r 2

__OnScreenRect osr.SetStyle(0x8000 1)
osr.Show(1 r)
wait iif(timeS timeS 2.0)
osr.Show(2 r)

example
Macro Macro2730
Code:
Copy      Help
;int w=win("WaterStrider - Conversation" "QWidget")
;int c=child("qt_scrollarea_viewport" "QWidget" w)
int w=win("Untitled - Notepad" "Notepad")
int c=id(15 w) ;;editable text
if(!c) end "control not found"

act w

RECT r
SetRect &r 8 8 60 60

DebugShowRectangle r c


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)