0



I have a script that:

  • creates a new folder
  • scans an InDesign document for images
  • formats the images and copies them to the new folder


When the script is done doing all of this I want it to bring to focus the new folder directory (in Windows).

As of now I am displaying the folder-path in an alert window, but I would rather it open the directory (if it isn't already) so the user can see the new files.


I wish I could just call one of these:
  • myNewFolder.bringToFront() :  works only on program focus, i.e. --                                                             BridgeTalk.bringToFront("photoshop")
  • myNewFolder.open() :  seems to apply only to file I/O operations
  • myNewFolder.show() :  seems to apply only to the  Window  object

...but none of these work.



EDIT:   new ActiveXObject("Scripting.FileSystemObject")  does not work either...

Ian Campbell
  • 2,678
  • 10
  • 56
  • 104

1 Answers1

1

You have to use the execute method.

myFolder.execute();
Loic
  • 2,173
  • 10
  • 13
  • Ah! I didn't see it see it before on jongware, but looking at the Folder object again I now see it on http://jongware.mit.edu/idcs6js/pc_Folder.html. Anyway, thanks @Loic! – Ian Campbell Jul 19 '12 at 14:40