Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
monitor blank area of window for any change
#19
ok i installed that program  for testing. i am not a ham nor could i hook it up to a radio.

this macro locates the text area on the right side of the window and then creates a rectangle of that area minus the scrollbars and then monitors it  for any change. 

displays a brief green rectangle at the start  that shows the rectangular area the macro is monitoring.

to copy this code click the select all button .then right click the selected code and click copy
then in qm find BlankAreaCk macro select all the code inside and then paste

Try this 

Macro BlankAreaCk
Code:
Copy      Help
int w=wait(30 WV win("WSJT-X   v2.0.0   by K1JT" "Qt5QWindowIcon"))
Acc a.Find(w "TEXT" "" "state=0x100040 0x20000040" 0x4 30)
int x y width height
a.Location(x y width height)
RECT r r1 rd rl;
r1.left=x
r1.top=y+10
r1.right=x+width-20
r1.bottom=y+height-20
r=r1
DpiScreenToClient w +&r 0x100
SetRect &rd r.left r.top r.right r.bottom
sub.DebugShowRectangle rd w 1
rep
,rl=rd
,out 1
,wait 0 -S "" w rl 16
,out 2
,a.Find(w "PUSHBUTTON" "Halt Tx Alt+H" "" 0x31)
,a.DoDefaultAction
,out 3
,0.3
,;lef 3652 1388 w 1 ;;radio button    
,a.Find(w "PUSHBUTTON" "Erase Alt+E" "" 0x1)
,a.DoDefaultAction
,out 4
,5
,a.Find(w "CHECKBUTTON" "Enable Tx Alt+n" "" 0x1001)    
,a.Mouse(1)
,out 5
#sub DebugShowRectangle
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)


Messages In This Thread
RE: monitor blank area of window for any change - by Kevin - 01-26-2019, 06:06 AM

Forum Jump:


Users browsing this thread: 16 Guest(s)