4 Replies Latest reply: Apr 4, 2012 9:04 AM by BigGunN RSS

    ScriptUI openDialog not working downgrading from CS5.5 to CS4


      So here is my newest bit of fun.  The scripts I have been writing have been in CS5.5, but I was informed today that they need to run on CS4.


      Most everything seems to be working, except one critical piece. Here is  a quick summary of what I am doing. 


      I am opening a window that has two text boxes and two buttons.  The first button opens up a file dialog box that lets the client choose where their XML file is located.  When they select it and click ok, it populates the first text box with the path. 


      The second button opens up a folder dialog box that lets the client choose the location of their images folder, and when they click ok, it populates the second text box with the path. 


      Everything works peachy in CS5.5.  But when I tried it in CS4, this is what it is doing.  When I choose a file and click OK, it is populating the text box with the word "File".  When I choose a folder, it is populating the second box with the word "Folder"


      Here are the relevant functions:


      f2.onClick = function()


           tf = File.openDialog("Select your XML File","*.xml");

           if (tf != null)


                e2.text = tf;

                tf = tf.fsName;




      f3.onClick = function()


           var tfol = new Folder("~/My Documents")

           tfo = tfol.selectDlg("Get Folder");

           if (tfo != null)


                e3.text = tfo;

                tfo = tfo.fsName;




      Like I said, this is working fine is CS5.5, but I need to know what is different in CS4 and how to get it to work.


      Thanks in advance for all your help.