Actionscript 複製 Photoshop 檔案名稱到剪貼簿

 var folderForTempFiles = Folder.temp.fsName;
 var text=activeDocument.name;

   // create a new textfile and put the text into it

   var clipTxtFile =new File(folderForTempFiles + "/ClipBoard.txt");
   clipTxtFile.open('w');
   clipTxtFile.write(text);
   clipTxtFile.close();

   // use the clip.exe to copy the contents of the textfile to the windows clipboard
   var clipBatFile =new File(folderForTempFiles + "/ClipBoard.bat");
   clipBatFile.open('w');
   clipBatFile.writeln("type \"" + folderForTempFiles + "\\" + "ClipBoard.txt\" | clip");
   clipBatFile.close();
   clipBatFile.execute();

小泉

喜愛用文字說明自己眼中所見的一切

張貼留言

較新的 較舊

نموذج الاتصال