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.
Copy link to clipboard
Copied
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
}