Script launching pop up waiting pop to close before resuming

Hi
here is what I’m trying to do
I have a window with a button
from the script I open a POPUP
I want the user to fill the popup and then close the popup then once the popup is closed and only when it is close, I want to resume the script on the original window

opening and close the popup are not the issue but the script in the main window does not pause while the popup is open.
Any solution ?

thanks
Phil

You basically cannot do this. Split your script into two parts: one to launch the popup, the other to close and process the results.

Thanks for the reply, but I’m not sure to follow you

if my script is

value = 0
system.tag.write(“PDA_TRUCKLOAD_SCANNED_DESTINATION”,value)
window = system.nav.openWindow(‘poptest’)
system.nav.centerWindow(window)
#need to wait here for data entry in Poptest

and it is inside the Mouse Click Event, how do I split in two ? unless I put the rest of the the script inside the close event of the poptest window ? is that what you meant ?

thanks
Phil

You can’t have a script waiting for something else on another popup to finish, like @pturmel said. You can do any tag writes or database entries or whatever you need to do to process the data from the button that closes your popup. If you need it to be done from your main window for some reason then you can use system.gui.getWindow() to find your window, then would you need to navigate to where ever you want the data to be used and write it there or call a script from a custom method. I don’t know how much data your trying to pass back in. If you just need one string entered by the user you may be able to use system.gui.inputBox() or if its just a confirmation to proceed then system.gui.confirm().

As a side note, you said its in the mouse click event, if its a button, the actionPerformed is where you should have the script to open your popup.