If your print statement is in the global scope then it will be executed during the script loading. All that sample code does is register a callback for when the accept button of the dialog is clicked and calls the specified function. If you need to display a series of dialogs sequentially, then I highly recommend using tasks. Using a callback approach will become very difficult once you have more than one dialog.
|