Feature Request: Extend TLO ${Window[]}

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Feature Request: Extend TLO ${Window[]}

Post by dewey2461 » Thu Oct 15, 2020 5:28 am

The Window TLO is the fundamental method a macro writer has to gather data from the EQ UI if there is no dedicated TLO for the data.

The Window TLO returns the first window that it finds that matches regardless of if it is open or closed. MQNext has modified this behavior by returning the first match that is visible, which is better, but not a complete solution.

I would like to propose that the window TLO ( and FindMQ2Window ) be extended to allow for a parameter which specifies the Nth window of that name.

Most of the time there is one window so the default behavior is good for 95% of the use cases.

The EQ client can have multiple "DialogConfirmationBox" windows allocated in the window list.

-------- STEPS to show the problem --------

1. /echo ${Window[ConfirmationDialogBox]} -> FALSE ( starting condition )
2. Wizard offers a TL to GH
3. /echo ${Window[ConfirmationDialogBox]} -> TRUE ( TL box is open )
4. Open overseer and select retire agent ( or any other confirmation )
5. Decline TL
6. /echo ${Window[ConfirmationDialogBox]} -> FALSE ( its picking up the TL box which is closed ) WHILE the retire agent box is open

From this point MQ will always return the TL confirmation box.

MQ2Next 'solves' this problem by returning the first VISIBLE confirmation window which is a step in the right direction but falls short if you want to be able to have your macro / plugin respond to only certain confirmation windows.

The only way to solve this is a general sense is to provide a method to walk return the Nth match.

From the macro land something like ${Window[ConfirmationDialogBox,1]} , ${Window[ConfirmationDialogBox,2]} , etc where the 2nd parameter tells the system which instance of the window to return.