add time delay
I have a script that I added a time delay which worked. I then tried to add a second time delay and cannot get this to work. The NO_OPTION in bold is where I am having a problem. If I select no here I would like to skip over the try section in italics then continue with the rest of the script. Is this possible? Thanks!
try {
long numMillisecondsToSleep = 8000; // 8 seconds
Thread.sleep(numMillisecondsToSleep);
} catch (InterruptedException e) {
}
int response = JOptionPane.showConfirmDialog(null,"Do you need more time?",
"Production Promote",
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE);
if (response == JOptionPane.NO_OPTION) {
} else if (response == JOptionPane.YES_OPTION) {
try {
long numMillisecondsToSleep = 8000; // 8 seconds
Thread.sleep(numMillisecondsToSleep);
} catch (InterruptedException e) {
}
int response1 = JOptionPane.showConfirmDialog(null," You are about to promote selected\n objects in commonspace to production.\nAre you sure?",
"Production Promote",
JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE);
if (response1 == JOptionPane.NO_OPTION) {
} else if (response1 == JOptionPane.YES_OPTION) {
IL.openWindow( "Promote", "", "" ); // recorded step: 1
IL.setAttribute( "Promote To", "Production" ); // recorded step: 2
IL.deselectAll( "PIV" ); // recorded step: 3
}
}
}
} // End of run0

