WINCLASS

x13

Nov 9, 2016
76
1
Netherlands
Hi all.

I'm writing a BTM to manipulate open windows (as in 'ACTIVATE xxx MIN', etc).
Some are weird in that they have no name (%@WINTITLE[%@PID[exe]] is empty).

So I thought I'd try my luck with @WINCLASS but I've never used it.
All the help says is that it requires a "classname"...

Assuming I'm heading in the right direction, how do I go about getting these class names, and how could I then use @WINCLASS ?

On a related subject, is it possible to use ACTIVATE (or something similar) to send a window to another screen?

Thanks.
Mark/x13
 

x13

Nov 9, 2016
76
1
Netherlands
Hi Charles.

We think alike.
I used WinLister too and tried to feed the class name listed into @WINCLASS ...

No cigar.

Is 'classname' akin to what might be used in @WMIC ?
 
Aug 23, 2010
688
9
AutoIt and AutoHotkey both have good helper tools.

But mind you, the TCC windows handling functionality is wildly inconsistent.
 

x13

Nov 9, 2016
76
1
Netherlands
Wow this is fantastic!

I never knew that trick with the "=" prefix.
Does that work everywhere? Don't remember seeing this in the manual...

Btw, ACTIVATE =%@PID[chrome.exe] MIN works also

Thanks for that!

Any idea how to move a window to another screen (right, left or by number) ?
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,689
106
Albuquerque, NM
prospero.unm.edu
Any idea how to move a window to another screen (right, left or by number) ?
You can do that with ACTIVATE /POS=. You just need to know the coordinate ranges for your second screen. On my work system, the second monitor uses negative X coordinates. It's possible that on your system, the second screen may have large X coordinates, starting at the primary monitor's right edge + 1.

The Windows screen-resolution applet has a graphic to show (and manipulate) the relative position of your monitors.