Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto resizing, moving and setting ontop to all new windows
#1
Hello,

I have used quick macros now for some time, but I am still not too expert in it. I want to create a macro or something in qm, to automatically identify any new windows appearing on the computer and resizing and moving them to some fixed coordinates already specified.

1. I want all new explorer windows to be moved to say 100 x 150 and resized to 1000 x 150. Their class is - CabinetWClass.

2. This is a little bit hard as I found out that idm (internet download manager) - new captured link download windows were a little problematic to make always be auto ontop. I want them to be alwaysontop and moved to - 548 x 540. However their class is - #32770 which is common for many other window types too so I want to use - the exact window title for these windows to be autodetected and then automoved and ontop. Their window title is - Download File Info.

With the help of these macros/functions etc., I will make myself similar ones for other windows.

I wud really like to have these ones added to my qm arsenal.

Thanks.
#2
easiest way is to create a function with a trigger

Function MoveResize_CabinetWClass_Example
Trigger !v"" "CabinetWClass"     Help - how to add the trigger to the macro
Code:
Copy      Help
int hwnd=TriggerWindow
mov+ 100 150 1000 150 hwnd

the second window can do the same just need to capture the window

something like this

Function MoveResizeOnTop_Download_File_Info_Example2
Trigger !v"Download File Info" "#32770"     Help - how to add the trigger to the macro
Code:
Copy      Help
int hwnd=TriggerWindow
mov 548 540 hwnd
Zorder hwnd HWND_TOPMOST
#3
Thanks Kevin for your quick reply and this is working very well for normal windows. The ontop thing should go well for normal other windows but for idm add download windows, setting them ontop has always been a bit problematic for me, I have tried some other ways too.

Now for setting the detected idm add download window, I am thinking to make another macro/function etc which on pressing the keys - CTRL ALT F10, sets the current active window Ontop. How can I do that, pls guide ?

Then I will add these keys pressing in the function trigger code for the idm's - Download File Info.

Thanks.


Forum Jump:


Users browsing this thread: 1 Guest(s)