Announcement

Collapse
No announcement yet.

Status Bar text (syntax issue)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Solved Status Bar text (syntax issue)

    I'm using the text entry box setting on Properties > Viewing > Status Bar text to add custom info to the status bar.

    I used the Text/Pattern Options examples that are provided in the IrfanView Help file to construct the following:

    Code:
    $M   $E36867(%a %d %b %Y (%I:%M %p))        $I120
    The above basically displays the EXIF date that a photo was taken (instead of the date that it was last modified) and formats it to my liking. It works perfectly except for just one problem: I want to have the time displayed in parentheses, but the parenthesis symbol has a special function that groups formatting commands together, so this has meant that I have ended up with one pair of parentheses nested inside another pair.

    I don't know how to "escape" the inner pair of parentheses to let IrfanView know that those ones are just text and not part of a text pattern function. I couldn't find anything in the help file on how to do this.

    The nesting of parentheses does not seem to cause any problem with images containing EXIF data (the status bar text displays exactly as I want it to) but for images that have no EXIF data (e.g. PNGs, screenshots etc.) I always end up with a single trailing closing parenthesis symbol " ) " showing in the status bar.

    How can I get rid of this solitary parenthesis in non-EXIF images without messing up my formatting when viewing an EXIF image?

    Thanks.

    #2
    The code that you posted shows only a right parenthesis even for files that include Exif date.
    Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

    Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

    Comment


      #3
        
      That's strange. It works fine for me (I'm using v4.53). See screenshots below:










      As a test, I just downloaded a clean portable version of Irfanview, and even if I leave all settings unchanged from the default and then just paste in the code string from above into the status bar settings, it still works fine. I've tried it on dozens of different photos from different time periods using different cameras, and they all work correctly (provided that EXIF data is present in the image).

      I don't know why the code doesn't work for you, I've checked and re-checked my code and it follows the correct format (aside from the nested parentheses).

      Regardless of the above, there surely must be a way to "escape" characters? The documentation says put a $ sign if you want to display a pipe |, dollar $, or hash # symbol, but this solution does not work for parentheses (it ends up just displaying the dollar sign as text).

      As a work-around, I can fix the issue if I change the parentheses around the time to square brackets instead [ ] (because then there's no longer 2 parentheses next to each other). The modified code example below does not show any trailing solitary parentheses in images that do not contain EXIF data, and EXIF images continue to display their metadata correctly (except obviously it now displays square brackets around the time instead of parentheses).

      Code:
      $M   $E36867(%a %d %b %Y  [COLOR="#FF0000"][B][[/B][/COLOR]%I:%M %p[COLOR="#FF0000"][B]][/B][/COLOR])        $I120
      The fact that this modification fixes the issue even more suggests that the problem is the double )) symbols (because the first one has has not been "escaped") and Irfanview does not have the ability to correctly detect multiple parentheses pairs on its own.

      Comment


        #4
        I think my sample file does not contain the right Exif Data.

        I am glad you found a workaround.
        Before you post ... Edit your profile • IrfanView 4.62 • Windows 10 Home 19045.2486

        Irfan PaintIrfan View HelpIrfanPaint HelpRiot.dllMore SkinsFastStone CaptureUploads

        Comment

        Working...
        X