• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

stuck in endless loop with File.openDialog

Community Beginner ,
Mar 24, 2014 Mar 24, 2014

Copy link to clipboard

Copied

I'm experiencing a new issue for me. One I have never run across in using this same function over the years. I'm using a line like this to locate a file.

var itemOut =  new File.openDialog(editText.text,"", false);

For some reason though, after I select the file, it pops up another dialog and won't ever quit popping another one up after I click OK. I'm running the scripts from the ESTK with AE 12.2.

TOPICS
Scripting

Views

297

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 24, 2014 Mar 24, 2014

Copy link to clipboard

Copied

LATEST

I think it could be something to do with my UI panel. If I make a simple test script, it doesn't fail. But in my main script it does. Here is  snippet of the code where I'm calling the function and prompt.

            dlg = new Window(alertBuilderResource);

            dlg.locPnl.dataFile.locBtn.onClick = function(){findSomething("file", dlg.locPnl.dataFile.et)};

           return dlg

            }

function findSomething(itemType, editText){

     if(itemType == "file"){

          var itemOut =  new File.openDialog(editText.text,"", false);

          alert(itemOut.name);

          }else{

          var itemOut =  new Folder.selectDialog(stringPrompt);         

         }

        if(itemOut){

        $.writeln(itemOut.toString());

        editText.text = itemOut.toString().replace(/%20/g," ");

        }else{

         var itemOut = "there was an error, please try again";  

         }

        return itemOut

     } 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines