It is currently March 28th, 2024, 9:42 pm

WindowState addon

Share and get help with Plugins and Addons
User avatar
winterwulf
Posts: 94
Joined: August 17th, 2016, 1:48 am
Location: São Paulo - Brazil

Re: WindowState addon

Post by winterwulf »

jsmorley wrote:Not sure those errors have anything to do with the plugin. "Invalid Token" is generally an error you get when you have a problem with the clock or clock settings on your PC, and you try to access some websites, in this case probably with WebParser. I think it can also happen if you have some corrupted cache in Internet Explorer and use WebParser.

We would need to see the code for the skin to get much further.
Sorry you were right about the invalid token, is was from spotify plugin, I removed from the post but wasnt as fast as you lol.

The skin I am using is the same from the OP, just downloaded and installed.


EDIT

Problem was I thought it was getting windows class, but it gets the window title, which in my case is in portuguese, sorry.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: WindowState addon

Post by jsmorley »

winterwulf wrote:Sorry you were right about the invalid token, is was from spotify plugin, I removed from the post but wasnt as fast as you lol.

The skin I am using is the same from the OP, just downloaded and installed.


EDIT

Problem was I thought it was getting windows class, but it gets the window title, which in my case is in portuguese, sorry.
No sweat...
User avatar
StArL0rd84
Posts: 424
Joined: February 8th, 2015, 10:07 pm
Location: EU, Denmark.

Re: WindowState addon

Post by StArL0rd84 »

Hello people

Been trying for a while to finish my "smart" folder skin for my suite.
Still looking for a way to make my folder skin (using windowstate) less resource hungry.
Granted i have a instance of RunCommand running for each folder in the skin.
But they already run one at a time in order to save resources.
If they all ran at the same time my CPU would jump from 18% to 45%. (8 folders)
But if the "folderupdater's" updatedivider is set to something like 50, i only see a increase of 5% on the CPU.
But that is still too much i think, and the skin is no longer snappy.

Code: Select all

[FolderUpdater]
Measure=Loop
StartValue=0
EndValue=8
Increment=1
OnChangeAction=[!CommandMeasure MeasureWindow[FolderUpdater] "Run"]
UpdateDivider=50
Then i thought if there was a way to detect how many folders was opened at the moment somehow, maybe that could be the trigger to "update" the folders in the skin with a onchange action or something.
Something like what i did in my HDD skin:

Code: Select all

[NumberOfDrives]
 Measure=Plugin
 Plugin=DriveList.dll
 NumberType=Count
 DynamicVariables=1
 OnChangeAction=[!UpdateMeterGroup Drives]
Yeah, the CPU would spike, but only for a moment.
Just checking if anyone knows a way.
Please ask if i didn't come across clear enough.
Tnx

Michael
([mWorkTime] = 1 ? #Work# : ([mEnergyLoss:%] >= 70% ? #Chillmode# : </>))
User avatar
PinkDev1
Posts: 1
Joined: November 2nd, 2019, 4:17 am

Re: WindowState addon

Post by PinkDev1 »

Becouse I found this when I knew nothing about coding RainmeterSkins, I feel like it's my duty to provide more info about this. This is for anyone that revisits this project in the future, and doesn't know anything about Rainmeter-Coding :D

The source-code of "WindowState.exe" is avalible in ...\Rainmeter\Skins\WindowState\@Resources\Addons\WindowState.au3 (after you install the .rmskin that OP provided)

If you're going to modify this addon's source-code, I highly suggest you first read this guide: https://www.autoitscript.com/autoit3/docs/tutorials/regexp/regexp.htm . Becouse the syntax of TitleRegExp is very delicate.

The [MeasureWindow] and [MeasureWindow] sections(functions?) are pretty much necessary for the whole thing to work.

The #CRLF# things in the [MeterWindowState] section, are just line-jumps (\n)

I don't even know if anyone will ever read this (becouse this whole project is quite old), but if YOU're reading this, I hope this helped. uwu
Gouloudrouioul
Posts: 17
Joined: May 17th, 2020, 2:07 am

Re: WindowState addon

Post by Gouloudrouioul »

Hello again ! Thanks jsmorley for pointing me toward this Addon of yours...

But... When I open Notepad, the Skin you made doesn't react at all. All the checkboxes stay blank

Any idea why ?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: WindowState addon

Post by jsmorley »

Gouloudrouioul wrote: May 23rd, 2020, 4:10 pm Hello again ! Thanks jsmorley for pointing me toward this Addon of yours...

But... When I open Notepad, the Skin you made doesn't react at all. All the checkboxes stay blank

Any idea why ?
Nope. Works for me.


1.jpg
You do not have the required permissions to view the files attached to this post.
Gouloudrouioul
Posts: 17
Joined: May 17th, 2020, 2:07 am

Re: WindowState addon

Post by Gouloudrouioul »

:/

Do you have Notepad++ installed ?
User avatar
Yincognito
Rainmeter Sage
Posts: 7028
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: WindowState addon

Post by Yincognito »

I used it as a base to create a "multi window state" variant, that supports looking for multiple window titles, via more than one regex parameter - you can check it here (at point 3).

EDIT: Updated the multi window state version by making it a background process running forever (or until killed by the RunCommand measure), able to send and receive data at chosen times to and from Rainmeter in any scenario (based on the content of the GetResult() function in the script compiled to executable by AutoIt). The final version is posted here.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth