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

Issue With Declaring Window Object in Extend Script

New Here ,
Jun 05, 2023 Jun 05, 2023

In my .jsx file I have the following function:

function showForm(filePath, dataPath)
{
  alert("Before");
  var dialog = new Window("window", "Select a folder");
  alert("After");
  dialog.show()
}
However, the second alert never appears indicating the code hangs on the Window object declaration.

Any ideas on why this may be?
TOPICS
Error or problem , Freeze or hang , Scripting
344
Translate
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
New Here ,
Jun 05, 2023 Jun 05, 2023

Just to clarify this is for an extension. This function is called by a JavaScript function that a button calls. I know this showForm function is called because I can see the first alert. Interestingly this works if I run it as a script.

Translate
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 Expert ,
Jun 05, 2023 Jun 05, 2023

Just running your function in ExtendScript Toolkit, I get a different behavior. I get the first alert, then the tiny window opens briefly (then disappears) and then I get the second alert. Don't know if that's helpful.

Translate
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 Expert ,
Jun 05, 2023 Jun 05, 2023
LATEST

Do you get any error messages when running it with the debugger active?

Also, are you sure you run the script with After Effects as host app? Premiere Pro is missing lots of the UI stuff, for example.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
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