Plugin process change Zpos value

Help with creating, editing & fixing problems with skins

Plugin process change Zpos value

February 16th, 2017, 4:06 pm
TrueFaith
   [19 posts]

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
Last edited by TrueFaith on February 16th, 2017, 4:08 pm, edited 1 time in total.
User avatar

Re: Plugin process change Zpos value

February 16th, 2017, 4:10 pm
jsmorley
Developer   [15222 posts]

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
User avatar

Re: Plugin process change Zpos value

February 16th, 2017, 4:20 pm
jsmorley
Developer   [15222 posts]

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

February 16th, 2017, 4:27 pm
TrueFaith
   [19 posts]

game played in window, not full screen.
User avatar

Re: Plugin process change Zpos value

February 16th, 2017, 8:30 pm
jsmorley
Developer   [15222 posts]

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

February 16th, 2017, 8:55 pm
TrueFaith
   [19 posts]

hm. can i detect is window minimized or not?
User avatar

Re: Plugin process change Zpos value

February 16th, 2017, 9:03 pm
jsmorley
Developer   [15222 posts]

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.

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: Bing [Bot] and 1 guest