Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Test-Button
#1
Some dialogs of the toolbar have a test-button which surrond the window or the control with a flashing rectangle. I guess there is a simple function behind this button. I have search for it, but not find it :roll: . Anybody knows which function this is? Or I need to write the code by myself?
#2
Macro Macro2176
Code:
Copy      Help
;simplest, black rectangle
RECT r; SetRect &r 400 300 500 350
rep 3
,OnScreenRect 1 r
,0.3
,OnScreenRect 3
,0.3
OnScreenRect 2


;red rectangle
RECT rr; SetRect &rr 400 300 500 350
__OnScreenRect osr
osr.SetStyle(0xff)
rep 3
,osr.Show(1 rr)
,0.3
,osr.Show(3)
,0.3
osr.Show(2)


;filled rectangle
osr.SetStyle(0xff0000 1)
rep 3
,osr.Show(1 rr)
,0.3
,osr.Show(3)
,0.3
osr.Show(2)
#3
Thanks for answer.

But I not write clear what I mean: I really want same functionalty like the test-button. A function which takes a window-/control-handle and highlights the window/control.

My idea is:
I want this as "debugging" feature. Each time my macro searched for a window/control, the macro should highlight the detected window/control.

This functionality is useful because the macros have sometimes a different behavior if run as exe or run in qm. Sometimes the macro-exe detect the wrong control (this is the matter of the application for which I write the macro). So when I test the macro, I immediatly can notice which control is detected.

I am just a beginner for qm and the first time it is hard to find immediately all functionality. Anyway qm is great tool Big Grin .
#4
Function ShowWindowRect
Code:
Copy      Help
;/
function hwnd

;Three times shows black rectangle around window or control.

;hwnd - window or control handle.

;EXAMPLE
;int w=win("Quick Macros" "QM_Editor")
;int c=id(2053 w) ;;tool bar
;ShowWindowRect c


RECT r; GetWindowRect hwnd &r
rep(3) OnScreenRect 1 r; 0.3; OnScreenRect 3; 0.3
OnScreenRect 2
#5
Thanks for this.

You call the Windows API! Idea Idea Idea This I have missed.


Forum Jump:


Users browsing this thread: 3 Guest(s)