Skip to main content
Legend
October 6, 2021
Answered

EditCaptureTime broken

  • October 6, 2021
  • 1 reply
  • 354 views

The EditCaptureTime object is broken. This sample script throws an error of not a function.

 

if(BridgeTalk.appName == 'bridge'){
    try{
        EditCaptureTime.ShiftBySetTime('+', 24);
        }
    catch(e){
        alert(e + ' '  + e.line);
        }
    }

 

 

This topic has been closed for replies.
Correct answer Lumigraphics

You mean more? Anyway that must be bug or we don't know how to use it 😕😕


Hacked at it until I figured it out. This is NOT properly documented, thanks Bridge Team. 😐

 

 

 

#target bridge
if(BridgeTalk.appName == 'bridge'){
    try{
        if(app.document.selectionsLength > 0){ //test for selection
            var a = new EditCaptureTime; //must create new object
            var f = app.document.selections; //selected Thumbnails
            var h = '';
            var sign = '+'; //add or subtract hours
            for(var j = 0; j < app.document.selectionsLength; j++){ //loop through selections
                h = f[j].spec.fsName; //get full pathname
                h = h.replace(/\\/g, '/'); //convert Windows paths for Extendscript
                a.addFilesForECT(h); //add files
                }
            a.shiftBySetTime(sign, 24); //adjust time for added files
            }
        }
    catch(e){
        alert(e + ' ' + e.line);
        }
    }

 

 

1 reply

Kukurykus
Legend
October 6, 2021

Shouldn't it to throw an error? 'EditCaptureTime' is not part of Bridge Scripting Refference.

Legend
October 6, 2021

 

 

If I run EditCaptureTime.reflect.methods it returns "call, apply, toSource"

Kukurykus
Legend
October 6, 2021

There are more functions if you write to console: (new EditCaptureTime).reflect.methods