What OS? What app? What scripting language?
OS: Windows XP SP3
App: Indesign CS3.3
(I just buyed Flash, maybe it's easy in ActionScript, but i haven't got the time to test it.)
myFile=myDocs.openDlg("Select Files To Open", myFolder+"/"+myMask, true);
It doesn't seem to be working.
The filter doesn't get applied, so it opens the current working folder and shows all files.
But that gave me an idea to change the folder and now it works with the following 2 lines of code:
Folder.current = new Folder("/C/testmap");
var fileref = new File().openDlg('Pick a file',"INDD or INDB:*.indd;*.indb",true);
Maybe it is possible to change your code to work, but i haven't found it.
Many thanks for your help!!!
In Norbert's example, set myDocs to the path you want to display before calling openDlg, and then it will open to the correct place.
In my tests I gave it a file instead of a folder.
For the one's who would like to see the new version of the code:
var myFile=myFolder.openDlg("Select Files To Open", myMask, true);
I saw your post re: browse folder, tried your suggestion, and can't get it to work. When I browse to the folder I need and select the file to open, it comes up blank.
What I'm trying to do is have the script open the window at a specific folder, allow me to pick the template file I need, and open it on click.
This is what I have so far. What am I missing?
myFolder=Folder("/K/Presentations/Presentation Header Templates");
myDocs="K:\Presentations\Presentation Header Templates";
myFile=myDocs.openDlg("Select File to Open", myFolder+"/"+myMask, true);
var myFolder = Folder("/K/Presentations/Presentation Header Templates");
var myMask = "InDesign:*.indd";
var myFile = myFolder.openDlg("Select Files To Open", myMask, true);
If you want to open InDesign templates (indt-files), then change the following line:
var myMask = "InDesign Templates :*.indt";
Thanks for the response, Kasyan. I used your suggestion, but I'm still not getting the results I'm looking for. A window does open allowing me to browse but it opens to the last window that was opened. Also, when I choose a file, it doesn't open it. I'm not using InDesign; I'm trying to run it from Acrobat.
This works fo indesign, photoshop, estk, etc. But I've never made any scripts in Acrobat. You'd better ask this question in Acrobat scripting forum.