Page 1 of 1

Plugin process change Zpos value

Posted: February 16th, 2017, 4:06 pm
by TrueFaith
i found in docs a way to set Zpos of skin, by detecting is targeted process is running or not, currently plugin changes Zpos from 0 to 2, if process of game is running Gw2-64.exe, but is there a way to change Zpos if there is Gw2-64.exe process is running and the window is on focus, and if window is not on focus - set Zpos back to 0

currently code looks like:

Code: Select all

[mProcess]
Measure=Plugin
Plugin=Process
ProcessName=Gw2-64.exe
UpdateDivider=5
IfAboveValue=0
IfAboveAction=!ZPos 2
IfBelowValue=0
IfBelowAction=!ZPos 0

Re: Plugin process change Zpos value

Posted: February 16th, 2017, 4:10 pm
by jsmorley
I don't know of a way to detect which application has "focus", as focus is about a "window" not an "application", but this plugin might help with a full-screen game like GW2.

https://forum.rainmeter.net/viewtopic.php?p=122046#p122046

Re: Plugin process change Zpos value

Posted: February 16th, 2017, 4:20 pm
by jsmorley
BTW, if the intent is to have one or more Rainmeter skins stay "on top" of a full-screen DirectX game, that probably won't work. It may depend some on the game, but in general normal windows using DWM can't be on top of application running in DirectX. At best, it may not work at all, at worst, they might "fight", and make the game unstable. I don't know about Guild Wars, but I do know Fallout 4 pitches a fit...

Re: Plugin process change Zpos value

Posted: February 16th, 2017, 4:27 pm
by TrueFaith
game played in window, not full screen.

Re: Plugin process change Zpos value

Posted: February 16th, 2017, 8:30 pm
by jsmorley
TrueFaith wrote:game played in window, not full screen.
Don't know of anything that will help with this off the top of my head. GW2.exe doesn't have "focus". As I said, focus is not about applications, but about windows.

There is just no reliable way to use the "class" name of a window, which can be found, to identify which application opened that window. Some window classes are helpful. Notepad++.exe opens a window with a class of "Notepad++". An Explorer window opened by Windows has a class of "CabinetWClass". Not as helpful. The Manage window in Rainmeter has a class of "#32770". Not helpful at all.

The "title" of a window is even less reliable, as many apps don't have one, and if they do, nothing at all says they need to be unique.

I guess my point is that in spite of what it might feel like, there is no "external" relationship between an application and the windows it opens. The application itself knows what it opened of course, it was given a "window handle". Nobody else has insight into that relationship.

Re: Plugin process change Zpos value

Posted: February 16th, 2017, 8:55 pm
by TrueFaith
hm. can i detect is window minimized or not?

Re: Plugin process change Zpos value

Posted: February 16th, 2017, 9:03 pm
by jsmorley
TrueFaith wrote:hm. can i detect is window minimized or not?
Nope. Not based on GW2.exe. If you know the class or title of a window, you can see if that particular window is minimized, or even has focus. Nothing to do with any particular application, unless it happens that GW2 always runs with a window that has a single, distinct, reasonably unique window class name.

Re: Plugin process change Zpos value

Posted: February 16th, 2017, 9:06 pm
by jsmorley