photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: photoken on June 14, 2014, 06:51:51 AM

Title: Formatting the info displayed in the File Window
Post by: photoken on June 14, 2014, 06:51:51 AM
I've customized the info displayed beneath the thumbnails in the File Window:
(http://www.ephotobay.com/image/im-file-info-01.png) (http://www.ephotobay.com/share/im-file-info-01.html)
It's the second line up from the bottom that I have questions about formatting.  It works great when the image has data for shutter speed, etc., but when the image does not, I'm left with this:
(http://www.ephotobay.com/image/im-file-info-02.png) (http://www.ephotobay.com/share/im-file-info-02.html)
I want that line to be centered, so I can't split it into left and right components and use prefixes and suffixes.  Here's the formatting code:
{File.MD.Composite\ShutterSpeed\ShutterSpeed\0|value:formatted} f/{File.MD.Composite\Aperture\Aperture\0}  ISO:{File.MD.Exif::Main\34855\ISO\0} EV:{File.MD.Exif::Main\37380\ExposureCompensation\0}

Is there a simple way to not have the "f/", "ISO:", and "EV:" appear if there's no data in the image?  Or do I have to use if...then...else statements in the formatting code?

[attachment deleted by admin]
Title: Re: Formatting the info displayed in the File Window
Post by: Mario on June 14, 2014, 08:33:12 AM
You can use prefix and suffix formatting functions to only output text if the variable has a value.

Check the default File Window Tip (Edit > Preferences > File Window Tip) for some examples. More examples are in the help, check out the Variables topic. Use the Var Toy App for easy testing.
Title: Re: Formatting the info displayed in the File Window
Post by: photoken on June 14, 2014, 08:46:34 AM
Whoooo!  Excellent!  Works like a charm.  Thanks!
(http://www.ephotobay.com/image/file-info-result.png) (http://www.ephotobay.com/share/file-info-result.html)

For those interested in the syntax, here's the code:
{File.MD.Composite\ShutterSpeed\ShutterSpeed\0|value:formatted} {File.MD.Composite\Aperture\Aperture\0|prefix:f/}  {File.MD.Exif::Main\34855\ISO\0|prefix:ISO:} {File.MD.Exif::Main\37380\ExposureCompensation\0|prefix:EV:}