It is currently April 27th, 2024, 4:15 pm

Reading file properties - specifically 'Title'

Get help with creating, editing & fixing problems with skins
ississi
Posts: 4
Joined: July 2nd, 2020, 9:15 am

Reading file properties - specifically 'Title'

Post by ississi »

Hi,

I'm using a gallery skin to randomly show images from folders on my PC. This is all working fine. When I mouseover it shows the file name at the top. What I want to replace this with is the file's Title property (if it's not blank) as most of the images have Title (and other properties, eg. Subject) set in their file properties.

How do I access the file properties and more specifically, the Title one if it exists, via Rainmeter, please?
I've looked at the Image meter and the FileView plugin and not spotted the answer.

Many thanks for any help.
User avatar
Yincognito
Rainmeter Sage
Posts: 7177
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Reading file properties - specifically 'Title'

Post by Yincognito »

ississi wrote: November 23rd, 2023, 10:49 am Hi,

I'm using a gallery skin to randomly show images from folders on my PC. This is all working fine. When I mouseover it shows the file name at the top. What I want to replace this with is the file's Title property (if it's not blank) as most of the images have Title (and other properties, eg. Subject) set in their file properties.

How do I access the file properties and more specifically, the Title one if it exists, via Rainmeter, please?
I've looked at the Image meter and the FileView plugin and not spotted the answer.

Many thanks for any help.
Rainmeter doesn't provide an image file's internal properties on its own, but I suppose those can be interrogated via either a CMD command line (or a command line tool like an EXIF or Metadata one) or a PowerShell one. Once you found how to do it and tested it in CMD.exe or PowerShell, getting the outcome in Rainmeter is just a matter of reading or manipulating via RegExpSubstitute / Substitute the STDOUT output retrieved by a RunCommand measure having the said Program and Parameter:
https://docs.rainmeter.net/manual/plugins/runcommand/

Note: You'll have to command that RunCommand measure (see Plugin Commands on the above page for details) to run the proper program and parameters on mouse hover, and this could take a few moments, since you'd be accessing the slower drive, so don't expect a real-time reaction to it. A possible alternative would be to get a list of the titles for all images in the folder instead and then grab the one you need from the RunCommand on hover, but this would also take time initially, depending on how many images are in the folder.

P.S. Another possible alternative would be to see if a Rainmeter plugin that grabs those image file properties exists in the Plugins section of the forum...
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16177
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Reading file properties - specifically 'Title'

Post by balala »

ississi wrote: November 23rd, 2023, 10:49 am What I want to replace this with is the file's Title property (if it's not blank) as most of the images have Title (and other properties, eg. Subject) set in their file properties.

How do I access the file properties and more specifically, the Title one if it exists, via Rainmeter, please?
I've looked at the Image meter and the FileView plugin and not spotted the answer.
Besides Yincognito's very good suggestions, what could help in such cases is a code. Post it please if you need specific advices.