If - else if (for pdf, rtf, image, video, html)

I currently have several scripts with similar aims that have to be separate because they differ slightly for different file types. I have been planning to merge them and instead have “if - else if - else if etc.” statements for various filetypes.

Could someone inform me of what applescript if-statements would look like for DEVONthink filetypes (content record of think window 1) like: pdf, rtf, image, html, video?

Look for the specifics regarding accepted strings in the definition of “type” among the the properties for “record” in DEVONthink’s dictionary.

Sometimes a complex “Swiss Army Knife” script with lots of if-then-else control statements can be costly to maintain (time-wise). Applescript is not very good at control statements and branching. If you have Keyboard Maestro (for example) consider making a DEVONthink-specific macro palette to contain individual macros for each of your utilities. It’s a bit more work on the front-end but a lot easier to maintain over the long run.

Just a thought.

Thanks. There will only be five if-statements so I’ll try it for now.

“picture” type doesn’t seem to work, but “png” works for images with .png format.