Need help with script/macro
Need help with script/macro
I've been looking at various scripts and macros in order to write my own but but I can't figure some things out and can't find any documentation to help me. Yes, I found the Macro help file but it still left questions.
To start with I'd like one that would display in a custom thumb whether the file is RAW or JPG. If RAW, display "RAW" in cyan and if JPG display "JPG" in yellow. I found an old macro to simply display "RAW" or "NOT RAW" based on %code result := iif(ImageItem.IsRAW, 'RAW','NOT RAW'); %/code but I can't figure out how to modify to display in selected color bases on results.
Can anyone give me some pointers?
To start with I'd like one that would display in a custom thumb whether the file is RAW or JPG. If RAW, display "RAW" in cyan and if JPG display "JPG" in yellow. I found an old macro to simply display "RAW" or "NOT RAW" based on %code result := iif(ImageItem.IsRAW, 'RAW','NOT RAW'); %/code but I can't figure out how to modify to display in selected color bases on results.
Can anyone give me some pointers?
Re: Need help with script/macro
%FileExtension should do it. No need for scripting. Select it from the drop down.
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Re: Need help with script/macro
Larry, I use a custom thumb line that shows the following...
File Extension, File Size, Pixel Dimensions.
The file extension is 'white' text. The other two items are 'yellow' text.
Unfortunately, I do not know how to change the file extension color conditionally, but this little bit of code may be useful for you.
--P
File Extension, File Size, Pixel Dimensions.
The file extension is 'white' text. The other two items are 'yellow' text.
Code: Select all
<font family="arial" size="12">%FileExtension{uppercase=y}</font><font family="arial" color="#80FFFF00">%ImageFileSizeShort %ImageDimension px</font>
--P
Preston Birdwell
Columbia, CA
Photo Supreme on Puget Systems Obsidian: Win 10-64 bit Intel i5Quad Core 3.3Ghz 32GB RAM, and Puget Systems Traverse Laptop. Chamonix 4x5 and Nikon D-7100.
Please visit my web site at www.gildedmoon.com
Columbia, CA
Photo Supreme on Puget Systems Obsidian: Win 10-64 bit Intel i5Quad Core 3.3Ghz 32GB RAM, and Puget Systems Traverse Laptop. Chamonix 4x5 and Nikon D-7100.
Please visit my web site at www.gildedmoon.com
Re: Need help with script/macro
Since my main goal was to highlight RAW files by having a different color I ended up with this:
<font color="cyan">%code result := iif(ImageItem.IsRAW, 'RAW', ''); %/code</font>
Since it won't display anything unless it's a RAW file I put at the end of a line otherwise there's an indention of the text line.
Originally I thought it would be nice to have different color based on RAW or not RAW indicator but my single colored "RAW" works for my purposes.
Thanks for the suggestions.
<font color="cyan">%code result := iif(ImageItem.IsRAW, 'RAW', ''); %/code</font>
Since it won't display anything unless it's a RAW file I put at the end of a line otherwise there's an indention of the text line.
Originally I thought it would be nice to have different color based on RAW or not RAW indicator but my single colored "RAW" works for my purposes.
Thanks for the suggestions.
Re: Need help with script/macro
I think something like this should get you close to the original request...
Code: Select all
%code result := iif(ImageItem.IsRAW, '<font color="cyan">RAW</font>', '<font color="yellow">JPG</font>'); %/code
Re: Need help with script/macro
Thank you jgodfrey. I'd tried several ways but never thought about your code. Thanks for posting.
Re: Need help with script/macro
These are professional coders
A good idea to colour code the files in this way. I just hope that I can find this tip when I need it.
A good idea to colour code the files in this way. I just hope that I can find this tip when I need it.
Never say never change, but using Mac since 2005. Photo Supreme 3.3.0.2605. I endorse the interoperability of files between applications and systems.
Re: Need help with script/macro
hahaha, why don't you create a text file and paste those snipped in with some notes
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com
Re: Need help with script/macro
hahaha, why we don't have a FAQ where to paste those tipps?
Edit:
I suggested the FAQ-idea in Mantis under "0003226: Creation of a FAQ", maybe people with the same interest can push this.
Edit:
I suggested the FAQ-idea in Mantis under "0003226: Creation of a FAQ", maybe people with the same interest can push this.
Photo Supreme beginner, former Aperture User
MacBook Pro with macOS BigSur
MacBook Pro with macOS BigSur
Re: Need help with script/macro
It can be submitted here:
http://repository.idimager.com/showcate ... p?GUID=015
http://repository.idimager.com/showcate ... p?GUID=015
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Re: Need help with script/macro
I do like the idea of an FAQ better. I remember we had a Wiki, but that was very complicated to maintain. Not sure if it still exists.
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com
Re: Need help with script/macro
You can always bookmark this thread by clicking on the spanner icon at the foot of the page and clicking "bookmark topic".
Re: Need help with script/macro
I still recommend to submit this to the repository. Why? Because in 4.1 it then appears in Photo Supreme when clicking the custom thumb info line’s drop down, right there where you’d use it
This is a user-to-user forum. If you have suggestions, requests or need support then please send a message
Re: Need help with script/macro
aaaah! Well...
Then it makes sense
I will submit mine too
Then it makes sense
I will submit mine too
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com
Re: Need help with script/macro
I assume, the resource file is in this case of a custum thumb script a regular txt file?
PSUServer 2024.x, PostgreSQL 12.x
My homepage http://www.michaelweidner.com
My homepage http://www.michaelweidner.com