Lightroom develop/keywords in PS3

weidmic
moderator
Posts: 835
Joined: 04 Dec 06 22:21

Re: Lightroom develop/keywords in PS3

Post by weidmic » 27 Mar 15 19:10

Hert,

thanks for the changed script.
Unfortunately it gives me a syntax error...

Maybe you can take a second look at the script :)

Regards,
Michael
PSUServer 5.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

weidmic
moderator
Posts: 835
Joined: 04 Dec 06 22:21

Re: Lightroom develop/keywords in PS3

Post by weidmic » 01 May 15 20:50

Found the failure...
Here is the updated script, in case someone is interested

Code: Select all

%ImageFileSizeShort  %code
    var
      ASoftware: WideString;
      AXmp: TXMP;
      ACRSParam: TMacroParam;
    begin
      AXmp := TXMP.Create(False);
      AXmp.CleanRead := True;
      AXmp.Load(ImageItem.XMPFileName, ImageItem.ExifFileName, False);
      ACRSParam := AXmp.XMPDesign.FindID('crs', False);

      ASoftware := '%xmp:tiff:Software';
      result := ToWideString('');
                     
             // add software ID
             // add software ID
                  result := result + '<FONT color="#888888">'
                  if WideTextPos('Capture', ASoftware) = 1 then
                    result := result + 'NX2'
                  else if WideTextPos('Photoshop', ASoftware) <> 0 then
                    result := result + 'CS4'
                  else if WideTextPos('Adobe DNG', ASoftware) <> 0 then
                    result := result + 'ADC'
                  else if WideTextPos('IDimagerSU', ASoftware) <> 0 then
                    result := result + 'PSU'
                  else if WideTextPos('Ver.1', ASoftware) = 1 then
                    result := result + 'CAM'
                  else if WideTextPos('http://www.idimager.com', ASoftware) = 1 then
                    result := result + 'IDI'
                  else
                   if Assigned(ACRSParam) then
                    result := result + '<FONT color="#CCB404">LR</font>';
                  else
                   result := result + '-?-';

                  result := result + '</FONT> ';

                  if ImageItem.IsRaw then
                    result := result + '</font> <FONT color="#888888">' + WideUpperCase('%FileExtension') + '</font>'
                  else
                    result := result + '</font> <FONT color="#888888">' + WideUpperCase('%FileExtension') + '</font>';
                     
                  // add GPS indicator
                  //if ImageItem.HasGPS then
                    //result := result + '<FONT color="#3300FF"> GPS</font>';
    end;
       %/code %GPSExists<a href="event:ShowGEOTag"><img size="22" pathcolor="#4080C0" path="M 370.498,312.759 C 370.498,327.010 365.378,339.176 355.137,349.255 L 355.137,349.255 C 344.896,359.335 332.632,364.375 318.345,364.375 L 318.345,364.375 C 304.058,364.375 291.812,359.416 281.606,349.497 L 281.606,349.497 C 271.294,339.507 266.138,327.386 266.138,313.135 L 266.138,313.135 C 266.138,298.883 271.294,286.745 281.606,276.719 L 281.606,276.719 C 291.812,266.800 304.058,261.841 318.345,261.841 L 318.345,261.841 C 332.632,261.841 344.860,266.729 355.029,276.504 L 355.029,276.504 C 365.342,286.423 370.498,298.507 370.498,312.759 L 370.498,312.759 Z M 367.759,312.437 C 367.759,299.152 362.853,287.765 353.042,278.276 L 353.042,278.276 C 343.302,268.895 331.772,264.204 318.452,264.204 L 318.452,264.204 L 313.081,275.215 L 318.936,276.396 L 323.501,271.831 L 331.558,272.368 L 333.169,276.665 L 328.335,281.499 L 328.335,284.399 L 331.343,284.990 L 332.739,282.734 L 338.057,279.404 L 337.896,281.660 L 339.883,285.098 L 337.520,287.568 L 339.023,289.019 L 335.479,289.233 L 336.929,292.134 L 329.248,295.786 L 330.430,300.137 L 328.013,300.137 L 326.938,295.840 L 321.299,295.732 L 320.278,297.397 L 317.969,296.323 L 314.209,300.083 L 317.217,303.682 L 317.109,307.656 L 320.278,310.020 L 338.755,312.114 L 344.609,316.250 L 343.911,326.509 L 331.182,339.238 C 330.358,340.062 329.552,342.354 328.765,346.113 L 328.765,346.113 C 328.013,349.658 327.744,352.183 327.959,353.687 L 327.959,353.687 L 326.025,355.889 C 324.521,352.917 322.570,348.351 320.171,342.192 L 320.171,342.192 C 319.598,340.080 319.097,337.394 318.667,334.136 L 318.667,334.136 C 318.345,331.450 318.022,328.747 317.700,326.025 L 317.700,326.025 L 309.644,318.936 L 316.787,310.503 L 313.833,306.260 C 309.285,305.329 306.331,304.496 304.971,303.762 L 304.971,303.762 C 303.610,303.028 301.265,300.978 297.935,297.612 L 297.935,297.612 L 300.728,303.037 L 298.848,303.843 L 294.497,295.679 L 295.356,288.052 L 294.014,282.681 L 289.824,278.599 L 286.763,277.847 L 284.077,279.727 L 281.123,280.479 C 272.995,289.860 268.931,300.638 268.931,312.813 L 268.931,312.813 C 268.931,326.419 273.800,337.967 283.540,347.456 L 283.540,347.456 C 293.172,356.838 304.810,361.528 318.452,361.528 L 318.452,361.528 C 332.095,361.528 343.723,356.748 353.337,347.188 L 353.337,347.188 C 362.952,337.627 367.759,326.043 367.759,312.437 L 367.759,312.437 Z "/></a>%GPSExists %code
    begin
      result := '%xmp:crs:HasCrop';
      result := StrTran(result, 'True', '<FONT color="#04B404">CRP</font>');
      result := StrTran(result, 'False', '');
    end;
    %/code
PSUServer 5.x, PostgreSQL 10.x
My homepage http://www.michaelweidner.com
PSU Tips and Tricks http://www.michaelweidner.com/WP/psu/

Post Reply