7 Replies Latest reply on Dec 30, 2015 3:34 AM by c.pfaffenbichler

    Script is not working...!!!

    natrev Level 3

      Hi EveryOne,


      I need to change my finder label color of file. However i get the script from Adobe forums (Re: Change Color Label of File with Javascript)

      The below mentioned script getting error. Please rectify that or tell me the alternate solution.

      Thanks to Christoper and Muppet Mark-QAl63s.


      //myscript.sh MUST exist with execute permissions!    
        var script = new File("~/Desktop/myscript.sh");   
        var filePath=new File("~/Desktop/Source1.tif");
        script.length = 0;   
        script.lineFeed = "unix";   
        script.length = 0;   
        script.writeln('Tell application "Finder" to set label index of (POSIX file "' + decodeURI(filePath) + '") to 2');