Hey everyone, first time posting here (new on the scene)
I'm writing up a couple of scripts, and would like to add a JPanel upon starting the script (like some of the Pro scripts) that allows the user to select various options before actually running through the script.
I was reading a similar post, and am able to get the Jpanel displaying correctly. However the script I have does not seem to wait until the user has clicked the 'Start' button on the JPanel UI
I have tried using ChatGPT for suggestions, and it has been suggesting 'CountDownLatches'. Is this what people have been using?
Are there any code examples of one of these JPanles being initialized from the script class that I could compare my code to? - Any help/suggestions would be greatly appreciated 🙂
@Override
public boolean onStart(String... strings){
startTime = System.currentTimeMillis();
System.out.println("Starting script...");
latch = new CountDownLatch(1);
new ScriptSettingsGUI(this, latch);
try {
latch.await(); // Wait until latch count reaches zero
} catch (InterruptedException e) {
e.printStackTrace();
}
return true;
}
JPanel help on script start
in Software & Script Development Discussion
Posted
Hey everyone, first time posting here (new on the scene)
I'm writing up a couple of scripts, and would like to add a JPanel upon starting the script (like some of the Pro scripts) that allows the user to select various options before actually running through the script.
I was reading a similar post, and am able to get the Jpanel displaying correctly. However the script I have does not seem to wait until the user has clicked the 'Start' button on the JPanel UI
I have tried using ChatGPT for suggestions, and it has been suggesting 'CountDownLatches'. Is this what people have been using?
Are there any code examples of one of these JPanles being initialized from the script class that I could compare my code to? - Any help/suggestions would be greatly appreciated 🙂
And then this is my JPanel class: