Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Active Windows / Output targets
#1
Searched but couldn't find info re ...

Just switched to QM as an old Winbatch user. I'm no programmer but have written quit a few Winbatch files which I am now translating to QM. I've so far not discerned how, say, to determine the active window beneath the mouse and transfer that window into a macro that will act upon that window. If I use GetWinXY or GetWinRect to act upon the active window, I understand that "out" outputs the results into the log window. What I have not been able to discover yet is how I can output the results to the screen or to a message box within a self-contained sizing, or size info, macro. Any help would be appreciated.
#2
if you've gotten as far as getting the info you want to "out" to the editor then you've probably gotten it to a variable. so...for a quick out to the screen you could use

str x
OnScreenDisplay x

to put it into a message box you can do this.

str x
mes x


that should get you started.
An old blog on QM coding and automation.

The Macro Hook
#3
Thanks, Ken -- It's too late where I am (or I'm so tired it seems late) to give your help a try, but I understand what you're conveying and appreciate the help.

Michael
#4
Quote:determine the active window beneath the mouse and transfer that window into a macro that will act upon that window

Any window can be identified by window handle - a unique numeric value. To store window handles, use variables of type int. To get the handle of the active window or window under the mouse pointer, use function win.

int hwndActive
int hwndMouse
hwndActive=win()
hwndMouse=win(mouse)

All window-related functions accept window handles.
#5
Thanks, Gintaras -- and congratulations on an astonishingly adept program at an astonishingly reasonable price. My head is slowly getting around analagous concepts of the WIL (Winbatch) language and that of QM. Your comments further my progress.
#6
msmail Wrote:My head is slowly getting around analagous concepts of the WIL (Winbatch) language and that of QM. Your comments further my progress.

when are you starting Monad?

:wink:
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)