Writing for MQ2 (Next eventually, but not ready to switch yet).
Having a devil of a time to always get an ItemDisplay window to close. Should be simple.
What's really puzzling is that if I get data from the window (e.g., /varset itemName ${Window[ItemDisplayWindow].Child[IDW_ItemInfo1].Text}), it's always what is expected. It seems like the UI just gets in a bad state with respect to correctly identifying the presence of this window and will only report properly after a
Am I missing something here?
Having a devil of a time to always get an ItemDisplay window to close. Should be simple.
/invoke ${Window[ItemDisplayWindow].DoClose} The problem is there are times (often) where MQ doesn't recognize said window is, in fact, open. /echo ${Window[ItemDisplayWindow].Open} reports FALSE when one is plainly visible. Alternatives like /notify ItemDisplayWindow 0 close which are in the doco (https://www.redguides.com/docs/projects/macroquest/reference/commands/notify/) just flat out do nothing (certainly the window doesn't close and no messages are given in the MQ window). Something like /notify ItemDisplayWindow CloseButton leftmouseup should also work, but MQ tells me CloseButton isn't a child of the window. And truly, /window ItemDisplayWindow doesn't list anything resembling a close button. But one is there anyway with a nice little tooltip to click it to close. Even if I had the correct name for the child element, I'm not certain this will work. The only thing that works "always" is /keypress esc. But this relies on the user having not turned off 'ESC to Close. I'm reluctant to rely on this.What's really puzzling is that if I get data from the window (e.g., /varset itemName ${Window[ItemDisplayWindow].Child[IDW_ItemInfo1].Text}), it's always what is expected. It seems like the UI just gets in a bad state with respect to correctly identifying the presence of this window and will only report properly after a
/reload. But since I'm expecting the UI to be in a certain state at the start of my macro, I can't just issue one and wait (plus it would be rude to the user).Am I missing something here?

