Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to identify highlighted images in javascript

Explorer ,
May 19, 2016 May 19, 2016

Sorry for the newbie question. I have a script that creates stacks by capture time for all images in a folder.

I'd like to be able to run it only on the highlighted images. I'm just not sure how to identify a highlighted image in javascript.

Thanks

TOPICS
Scripting
393
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
May 20, 2016 May 20, 2016
LATEST

This is from Edit Script Add Pictures eliminated the dialog box

#target photoshop;

alert(GetFilesFromBridge().join('\n'));

function GetFilesFromBridge() {

function script(){

var fL = app.document.selections;

var tF=[];

for(var a in fL){

    if(fL.type =='file'){

        tF.push(new File(encodeURI(fL.spec.fsName)));

        }

    }

return tF.toSource();

}

  var fileList;

  var bt = new BridgeTalk();

  bt.target = "bridge";

        bt.body = "var ftn = " + script.toSource() + "; ftn();";

  bt.onResult = function( inBT ) { fileList = eval( inBT.body ); }

  bt.onError = function( inBT ) { fileList = new Array(); }

  bt.send(8);

  bt.pump();

  if ( undefined == fileList ) fileList = new Array();

  return fileList;

};

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines