Author Topic: Logical function - if-then-else or case  (Read 4258 times)

Offline w0lf

  • Newcomer
  • *
  • Posts: 6
    • View Profile
    • 10x8.com
Logical function - if-then-else or case
« on: April 13, 2007, 04:02:53 AM »
Hi,

I am delighted about the inclusion of a substring function in the 4.5 release. I wonder whether it'd be possible to have a logical function available as well, for instance "if then else", or ideally a "case". Here's what I'd want it to do:

My file names are a long string of numbers when they are untreated. As they go through post production, I append version numbers at the end, "v1" etc;  "RP" for Ready to Print; Mockups are "MU".

I'd like to be able to generate a full-word description from the abbreviations in the galleries, or also for IPTC.

So (in hair-raising mock-code) what I'd need is something like:

case ({filenamebase:-2,2};  "v1", "Edit version 1";   "MU", "Low-resolution mock-up";   "RP", "Ready to Print")

so for a file called "678963673RP.psd" the function would return "Ready to Print".

But a function like that would be great, as I could turn my internal file naming conventions into a proper, legible narrative for my clients.

Thank you, and as always - great product.

Wolf