It is currently June 27th, 2019, 11:06 am

Measure information from application

Help with creating, editing & fixing problems with skins
User avatar
Langlu
Posts: 13
Joined: June 7th, 2019, 11:49 pm

Measure information from application

Langlu » June 8th, 2019, 12:04 am

Hey,been using Rainmeter for a while but just getting into actually creating skins myself.

I just have a general question regarding a certain potential use of a Rainmeter skin.

Going through a few tutorials and I was just wondering if it is possible to create a Rainmeter skin that can return values by measuring certain information inside of an application. Firstly, can it do this while the application is closed, or if not, can it do this by opening the application (in the background) and display the information (binding a meter to a measure).

If you have any examples of such a skin, or tutorials that explain how to tackle this exact problem, would be much appreciated.

Thanks!
User avatar
Langlu
Posts: 13
Joined: June 7th, 2019, 11:49 pm

Re: Measure information from application

Langlu » June 8th, 2019, 12:43 am

Would this be a measure plugin, and something that would have to be programmed or taken from custom plugins (3rd party)?
User avatar
jsmorley
Developer
Posts: 19273
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Measure information from application

jsmorley » June 8th, 2019, 12:59 am

Right. There would have to be a custom Rainmeter plugin that was designed for the application in question, or alternatively, if the application can be made to output some kind of textual file that you can read with WebParser or Lua or Powershell, that could work.
User avatar
balala
Rainmeter Sage
Posts: 8320
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Measure information from application

balala » June 8th, 2019, 6:04 am

Langlu wrote:
June 8th, 2019, 12:04 am
Going through a few tutorials and I was just wondering if it is possible to create a Rainmeter skin that can return values by measuring certain information inside of an application. Firstly, can it do this while the application is closed, or if not, can it do this by opening the application (in the background) and display the information (binding a meter to a measure).
Beside jsmorley's reply, I think it depends on the application. Isn't always and absolutely necessary to have a plugin. For example if the application stores the information you want to read into a file (like Rainmeter does), you can use a WebParser measure to read the file and can show the result into your skin. Probably yes, the plugin could be the best solution, however, not sure it is absolutely necessary. If there is a such file, storing the needed information, it can be read, even if the application is closed (or even better then).
So, would be good to know what application are you talking about. Is there any chance to have a such file?
User avatar
Langlu
Posts: 13
Joined: June 7th, 2019, 11:49 pm

Re: Measure information from application

Langlu » June 8th, 2019, 9:23 am

balala wrote:
June 8th, 2019, 6:04 am
Beside jsmorley's reply, I think it depends on the application. Isn't always and absolutely necessary to have a plugin. For example if the application stores the information you want to read into a file (like Rainmeter does), you can use a WebParser measure to read the file and can show the result into your skin. Probably yes, the plugin could be the best solution, however, not sure it is absolutely necessary. If there is a such file, storing the needed information, it can be read, even if the application is closed (or even better then).
So, would be good to know what application are you talking about. Is there any chance to have a such file?
Thanks both for the clarification. Will do a lot more research and practice on what you just mentioned.

I wish I had more information, I don't fully understand how the application works so will check that as well. All I know is that once I open it, it shows information (a list of current users for example), and every time I run it, it shows different information depending on who is online.

I have created a Rainmeter skin that opens it, but now want one to read it (measure).

But to your point, I will check if once the application is opened, if a separate file (text file?) is created somewhere, and then use Webparser measure to read certain information in the file and display it in my skin. Just a quick question though. What if, say once the application is run, that a separate file is not created. Can I still use Webparser measure to read information from the window that just opened? Probably not right? I would have to manually get the data, store it into a file, and make Rainmeter measure that.
User avatar
Langlu
Posts: 13
Joined: June 7th, 2019, 11:49 pm

Re: Measure information from application

Langlu » June 8th, 2019, 2:18 pm

Actually, I think I've answered my own question just now.

Thanks for pointing me in the right direction!

Will update once finished (hopefully) :)
User avatar
balala
Rainmeter Sage
Posts: 8320
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Measure information from application

balala » June 8th, 2019, 3:56 pm

Langlu wrote:
June 8th, 2019, 9:23 am
But to your point, I will check if once the application is opened, if a separate file (text file?) is created somewhere, and then use Webparser measure to read certain information in the file and display it in my skin.
Unfortunately not all application creates a such file, to store the variables / settings into it. In fact, I think most of them doesn't, storing the information into the registry. The registry also can be read, however if I (me) don't have the application installed, it's very hard to help to see what should have to be read. Plus if the information are stored into the registry, the entries can be hard to be interpreted.
Langlu wrote:
June 8th, 2019, 9:23 am
Just a quick question though. What if, say once the application is run, that a separate file is not created. Can I still use Webparser measure to read information from the window that just opened? Probably not right? I would have to manually get the data, store it into a file, and make Rainmeter measure that.
Right, with WebParser measures you can read files, but no windows, regardless it is opened or closed. Sorry...
User avatar
Langlu
Posts: 13
Joined: June 7th, 2019, 11:49 pm

Re: Measure information from application

Langlu » June 8th, 2019, 5:04 pm

balala wrote:
June 8th, 2019, 3:56 pm
Unfortunately not all application creates a such file, to store the variables / settings into it. In fact, I think most of them doesn't, storing the information into the registry. The registry also can be read, however if I (me) don't have the application installed, it's very hard to help to see what should have to be read. Plus if the information are stored into the registry, the entries can be hard to be interpreted.

Right, with WebParser measures you can read files, but no windows, regardless it is opened or closed. Sorry...
Yep, fully understood, I will investigate how the application stores information, or if I can debug and create html text file of the output of the application.

I know how to use meters to display the measures that I retrieve from webparser, but is there a way to click the skin and make it store the information in a separate text folder. Perhaps a way to incorporate a "leftmouseupaction" command somehow?
User avatar
balala
Rainmeter Sage
Posts: 8320
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Measure information from application

balala » June 8th, 2019, 5:31 pm

Langlu wrote:
June 8th, 2019, 5:04 pm
but is there a way to click the skin and make it store the information in a separate text folder. Perhaps a way to incorporate a "leftmouseupaction" command somehow?
Have no idea. It probably depends on many things, can't say if I don't know the application we're talking about.
User avatar
Langlu
Posts: 13
Joined: June 7th, 2019, 11:49 pm

Re: Measure information from application

Langlu » June 8th, 2019, 5:47 pm

balala wrote:
June 8th, 2019, 5:31 pm
Have no idea. It probably depends on many things, can't say if I don't know the application we're talking about.
Sorry let me rephrase, using Webparser to measure, and then meter to display what I'm measuring is working fine.

Regardless of the application, is there a command in Rainmeter that can store what the skin is displaying (through a meter) as a text file (as well as display it, which I now know how to do).

i.e, just a general question of exporting what a meter displays to a text file.