0 Replies Latest reply on May 26, 2016 7:41 AM by daveream@levtechinc.com

    shell out on a Mac

      Never worked on a Mac. Since you can't copy a string to the clipboard (pasteboard) in JS directly I tried this:

      var folderForTempFiles = Folder.temp.fsName;
      var clipboardShName = folderForTempFiles + "/ClipBoard.sh";
      var clipShFile = new File(clipboardShName);
      clipShFile.write("cat " + clipboardTextFileName + " | pbcopy");

      this code works on a Windows system with the obvious changes of making the file .bat using a command to copy the file to 'clip'.

      However, a Mac user who tried this said didn't work.

      What do I need to tweak it?

      The text is already written to the clipboardTextFileName file.