Both the print and pagesetup statements are only one line of code in Panorama. That one line trigger’s Apple’s code to open and operate these dialogs. Once the trigger is sent, Panorama has no further involvement. Panorama has no idea whether the dialog is open or what is going on with the dialog. So no, there is no function for ascertaining whether these dialogs are open, and I don’t know of any way to write such a function.
The info("dialogsheet") function only works with dialogs that are managed by Panorama, with the rundialog statement. It does not and cannot work with dialogs that are managed by Apple’s code.
As I mentioned above, Panorama has no involvement with the operation of these dialogs, and can’t even tell that they are open. So I have no idea how to debug an issue like this, and I’ll have to give you the same advice as Henny Youngman’s doctor - don’t do that!
I had posted earlier about how PanX hangs when I used the PageSetup statement to set a report to Landscape in a procedure. This always worked in previous Pans.
What worked before (in Pan 6) and what works today (in Pan X) may be different. As you probably already know, if you open a Page Setup dialog, it had best be the last statement in your procedure. Read the Help file for further clarification.