Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tiling 2 Windows
#1
I'm trying to create two macros for use with Directory Opus, a program with which I always have two open windows -- tiled either horizontally or vertically, depending upon my needs. The following ALMOST works -- "almost" because the second window will not tile. I think it's because I have not cleared the variable which is used to identify each window, but I may be wrong. Any suggestions?

(By the way, I use this macro compiled. Otherwise, it could only be applied to QM. I also tried setting up a separate macro for the sizing the second window, but it, too, did not work.)

bee "D:\Media\Ding 01.Wav"
sel(mes("After clicking OK, move the cursor atop[]the window to be positioned on top ..." "" "OCits"))
case 'C' ret
2
int hwndActive
int s = hwndActive
MoveWindow win("s") 3 6 1272 495 1
1
run "C:\Apps\Quick Macros\Data\Compiled\Opus - Horizontal B.Exe"

bee "D:\Media\Ding 01.Wav"
inp- b "Identify bottom window"
sel(mes("After clicking OK, move the cursor atop[]the window to be positioned on bottom ..." "" "OCits"))
case 'C' ret
2
int hwndActive
int t = hwndActive
MoveWindow win("t") 3 514 1272 495 1
#2
int hwndActive
int s = hwndActive
win("s")

First two lines have no sense. Third line finds first window that contains "s" in its name. Correct code:

Code:
Copy      Help
bee "D:\Media\Ding 01.Wav"
sel(mes("After clicking OK, move the cursor atop[]the window to be positioned on top, and click" "" "OCits"))
,case 'C' ret
wait 30 ML
MoveWindow win(mouse) 3 6 1272 495 1
;...
#3
Thanks you, Gintaras. I'll give it a shot. The lines that did "not make sense" were attempts to see what happened using what I thought were your responses to my earlier question:

"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)"

As you remarked, I could find nothing in help re win(mouse). Furthermore, every time I included it in a trial macro the "mouse" greyed out. However, I shall try it again, minus my non-sensical lines, and see what happens. Thanks again.
#4
Gintaras -- It works as advertised. Thanks for your patience.


Forum Jump:


Users browsing this thread: 1 Guest(s)