• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->
  • The results are in, 🎆🎉🎆 congratulations 🎆🎉🎆 to all the authors in the 3rd Annual "EverQuest Software Awards"!

Question - Navigating window structures for information in macro (1 Viewer)

Jun 7, 2020
Hi RedGuides

I feel I have an understanding of Window, in that it has a number of properties (members) variables that can be seen. These include details about other windows it relates to, as sibling, parent and child.

Some time ago, I posted on here about Quests, to quickly recap.
Looked at the "TaskWND", and it's child "Task_TakList".

By looking at the value for ${Window[TaskWND].Child[Task_TaskList].Items} would provde the number of quests in the journal.
It is possible to iterate over them and get the names of each quest. A for loop,. start the iterator at 1, and run until that above number of items. The 3rd column is the quest name.
${Window[TaskWND].Child[Task_TaskList].List[ iterator, 3]}

More recently, I've been looking at this again, and learned that "Task_TaskList" is of type "Listbox". When looking at a child window, of type Listbox, then it has a number of Items. (as described above).

Moving on from Quests, I am interested in looking at the character windows for Faction and Achievements.
Using MQ2Hud and mouse over, I can see some information on their structure, starting with the left panel.

FactionWnd -> FAC_Categories
AchievementsWnd -> ACH_Categories

Checking the type of window for those two named categories it comes back "TreeView".

How to enumerate the content of this TreeView?

Unlike the Listbox, the value of Items returns as 0.
checking for children, returns false.

In game, as a player we can see a list of expansion "graphical logos" and also a tool tip in text if mouse by them.
How to access this information with MQ2 macros?
e.g. to be able to select a specific expansion by name, to then be in a position to look at the right hand panel for more specific information.

Again with reference to MQ2Hud, and it showing the names of whatever is being moused over. There are a fair number of pieces when wander around "ACH_AchievementsPage".
But when look at the left panel for "ACH_Categories", it's consistent. The HUD output doesnt change, everything in there thinks it is "ACH_Categories". Similar said for Factions, the left panel of "FAC_Categories".

So as asked above, how to handle these TreeView structure?
e.g. to be able to list the names of elements in tree and later, select an element; akin to the player having clicked one with the mouse.

Regards and Best Wishes.
Jun 7, 2020
Chat, Thanks for that thought re: overseer.

I've studied it, and continued to poke around but still feel stuck in the maze.

Below is a breakdown of what I've seen so far.

Overseer Macro source

Looking at the agents page, it's a lot of "OW_OM_MinionEntry" and it felt promising.
Similar thought when saw Active Quests "OW_BtnQuestTemplate" and that also appears on the Quests panel as well.

Thankfully, out of all the overseer macro, there are only a couple lines that have the minion entry.
/declare agentName string
/declare agentNode string Window[OverseerWnd].Child[OW_OM_MinionList].FirstChild
/varset agentName ${$agentNode}.Child[OW_OM_MinionEntry].Text}

Glue that together for ease of read, 3 objects:

I don't see the minion list as chase around with the hud over the overseer panel.

I've had a look another way round, I recalled from your video talk of using the HUD to save going to the XML files. Well, I went to the XML files.

OverseerWnd (Screen), has piece OW_Subwindows (TabBox), has page "OW_OverseerMinionsPage" (Page) , has pieces "OW_OM_Layout" (Vertical Layout Box), has pieces OW_OM_TopPane & OW_OM_Bottom.​
Following that Bottom.... OW_OM_Bottom (Horizontal Layout Box) has OW_OM_BottomLeftPane (Screen), which has pieces OW_OM_MinionList (ListBox).
OW_OM_MinionList has no pieces from it.​
FactionWnd (Screen), has piece FAC_Main_Layout (Horizontal Layout Box), has two pieces FAC_Categories (TreeView) and FAC_FactionLayout (Screen).​
That faction layout screen, will be the right hand panel, as it has pieces for search name input, the button and faction list.​
FAC_Categories, has no pieces from it.​

AchievementsWnd (Screen), has piece ACH_Main_Layout (HorizontalLayoutBox), has two pieces ACH_Categories (TreeView) and ACH_AchievementLayout (Screen).​
The achievement layout screen, feels its the right hand panel as it has a myriad of pieces of label, button and gauge types, "open complete locked" which appear at the top.​
ACH_Categories, has no pieces from it.​

In the 'uifiles/default' directory, I did a grep for "Tree" to see what it would throw up.
In short, the only XML to have 'TreeView' structures are:
  • EQUI_AchievementsWnd
  • EQUI_Animations
  • EQUI_FactionWnd
  • EQUI_FileSelectionWnd
  • EQUI_MarketplaceWnd.

When I check the following in game:
/echo ${Window[OverseerWnd].Child[OW_OM_MinionList].FirstChild.Child[OW_OM_MinionEntry].Name}
- OW_OM_MinionEntry​
/echo ${Window[OverseerWnd].Child[OW_OM_MinionList].FirstChild.Child[OW_OM_MinionEntry].Type}
- button​
/echo ${Window[OverseerWnd].Child[OW_OM_MinionList].FirstChild.Child[OW_OM_MinionEntry].Text}
- Avatar of Tunare Status:Questing​
/echo ${Window[OverseerWnd].Child[OW_OM_MinionList].FirstChild.Children}
/echo ${Window[OverseerWnd].Child[OW_OM_MinionList].FirstChild.Siblings}
- True​
/echo ${Window[FactionWnd].Child[FAC_Categories]}
- true.​
/echo ${Window[FactionWnd].Child[FAC_Categories].Name}
- FAC_Categories​
/echo ${Window[FactionWnd].Child[FAC_Categories].Type}
- TreeView​
/echo ${Window[FactionWnd].Child[FAC_Categories].Text}
- empty space
(i.e. not NULL, just the [MQ2} chars and empty space after it )​
/echo ${Window[FactionWnd].Child[FAC_Categories].Tooltip}
- empty space
/echo ${Window[FactionWnd].Child[FAC_Categories].Children}
- false​
/echo ${Window[FactionWnd].Child[FAC_Categories].Siblings}
- true​

One single piece of encouragement.....
/echo ${Window[FactionWnd].Child[FAC_Categories].MouseOver}
- false​
- which then turned 'true' on retest, with the mouse actually over the first faction "Everquest" logo.​

I don't know where to find details of what properties / members there are for this TreeView object.

I've been hunting around the MQ2 wiki documents, e.g. https://www.macroquest2.com/wiki/index.php/DataType:window


Dec 29, 2017
I believe the elements you want to access are dynamically created over the listbox and you would have to access them recursively. A better example is likely the collection macro on the VIP forums for macroquest.com

I had at one point considered making both an overseer and a collection macro and didn't figure either window out. The authors who wrote those two macro would hopefully be able to explain how they achieved it even if you can't sort it out with their code. Perhaps consider sending them a message. You could possibly collaborate on it.
Jun 7, 2020
Thanks Chat.

I believe GoldenFrog has done things for Overseer, so have dropped a message there.
with regards macroquest vip, i dont know about this. Only forums i have are here at redguides.

To my last comment in the battle, i was trying to figure out the properties / members of this TreeView.
Nothing stood out on the mq wiki website.

Then I remembered the VV source code from last year.
In the MQ2Main directory, a grep over the files brought "EQClasses.h" to my attention.

CTreeView from MQ2Main/EQClasses.h:
class CTreeView : public CListWnd
EQLIB_OBJECT CTreeView::CTreeView(class CXWnd *,unsigned __int32,class CXRect,int);
// virtual
EQLIB_OBJECT CTreeView::~CTreeView(void);
I took that to mean, TreeView is inherriting from ListWnd.

A further hunt for ListWnd to see if it helped with properties / members
CListWnd from MQ2Main/EQClasses.h:
//Size is 0x298 in eqgame Sep 11 2017 Test (see 8D1D4C) eqmule
class CListWnd//ok Look... this SHOULD inherit CXWnd but doing so... calls the constructor, and we dont want that... so... : public CXWnd
    //we include CXW instead...
/*0x004*/ CXW_NO_VTABLE
//alright now that we got that settled, it also has members of its own:
//look, as a reminder to myself and future maintainers:
//NOTE: ItemsArray has subids and this is the reason why you WILL NOT see
//anything useful in the debugger sometimes if you cursor over it and expand it...
//So... list->ItemsArray.m_array[0].Cells.m_array[1] might display something
//while list->ItemsArray.m_array[0].Cells.m_array[0] might not -eqmule
#if !defined(ROF2EMU) && !defined(UFEMU)
/*0x1f0*/ int Filler0x1f0;
/*0x1f4*/ ArrayClass_RO<SListWndLine_RO> ItemsArray; //see CListWnd__GetItemData_x 0x8BD768                 add     ecx, 1F4h
/*0x204*/ ArrayClass_RO<SListWndColumn_RO> Columns;
/*0x214*/ int    CurSel;
/*0x218*/ int    CurCol;
/*0x21c*/ int    DownItem;
/*0x220*/ int    ScrollOffsetY;
/*0x224*/ int    HeaderHeight;
/*0x228*/ int    FirstVisibleLine;
/*0x22c*/ int    SortCol;
/*0x230*/ bool    bSortAsc;
/*0x231*/ bool    bFixedHeight;
/*0x232*/ bool    bOwnerDraw;
/*0x233*/ bool    bCalcHeights;
/*0x234*/ bool    bColumnSizable;
/*0x238*/ int    LineHeight;
/*0x23c*/ int    ColumnSepDragged;
/*0x240*/ int    ColumnSepMouseOver;
/*0x244*/ COLORREF    HeaderText;
/*0x248*/ COLORREF    Highlight;
/*0x24c*/ COLORREF    Selected;
/*0x250*/ CUITextureInfo2    BGHeader;//size 0x18
/*0x268*/ COLORREF    BGHeaderTint;
/*0x26c*/ CTextureAnimation    *pRowSep;
/*0x270*/ CTextureAnimation    *pColumnSep;
/*0x274*/ CEditBaseWnd    *pEditCell;
/*0x278*/ void    *pItemDataSomething;
/*0x27c*/ bool    bHasItemTooltips;
/*0x280*/ RECT    PrevInsideRect;
/*0x290*/ UINT    ListWndStyle;
/*0x294*/ LONG    LastVisibleTime;//change to a __time32_t? not really important...

EQLIB_OBJECT CListWnd::CListWnd(class CXWnd *,unsigned __int32,class CXRect const &);
EQLIB_OBJECT CListWnd::CListWnd() {};
EQLIB_OBJECT bool CListWnd::IsLineEnabled(int)const;
long group of function  / procedure / method like names
//EQLIB_OBJECT void * CListWnd::`vector deleting destructor'(unsigned int);
EQLIB_OBJECT void CListWnd::DeleteAll(void);
EQLIB_OBJECT void CListWnd::Sort(void);
EQLIB_OBJECT void CListWnd::SetColumnsSizable(bool bColumnsSizable);
EQLIB_OBJECT void CListWnd::GetWndPosition(CXWnd *pWnd, int &ItemID, int &SubItemID)const;
EQLIB_OBJECT void CListWnd::SetItemWnd(int Index, int SubItem, CXWnd *pWnd);
EQLIB_OBJECT CXWnd *CListWnd::GetItemWnd(int Index, int SubItem) const;
EQLIB_OBJECT void CListWnd::SetItemIcon(int Index, int SubItem, const CTextureAnimation *pTA);
EQLIB_OBJECT void CListWnd::CalculateCustomWindowPositions();

Which I have taken as it has those from Window, but anything else isnt jumping out.

At the moment, im still lost at sea and fumbling around in the dark. I feel thats mainly through lack of information that describes TreeView.


Dec 29, 2017
Here's the link to the collections macro I was talking about. It's in the VIP section or I'd simply discuss it with you. Things posted in the VIP section aren't meant to be shared outside of the VIP section, but it's only $10 a year for VIP on the macroquest forums, so if you grab VIP we can discuss that more in depth. The idea is that it contains code to iterate through the achievement window for different expansions and subsequently it also contains the logic to iterate through all the checkbox text for each of the collection listings so this is likely more geared towards what you're wanting to get done using the faction window since that share that same Tree type that you're talking about.

Jun 13, 2016
As far as your first question, looks like you want to enumerate each active quest:

The script below will output "Crystal Geonids", "Crystal Spiders", etc...

    /declare questCount int ${Window[TaskWND].Child[Task_TaskList].Items}
    /declare index int

    /echo --- There are ${questCount} Quests --
    /for index 1 to ${questCount}
        /echo ${Window[TaskWND].Child[Task_TaskList].List[${index},3]}
    /next index
Depending what you want to do, you can assign that value, act on it, or look at different columns.


Nihil ᛗ
May 5, 2016
until we get the faction structs populated with stuff we're left to using the window to try and get faction

here's a quick little hotkey to get faction - unfortunately you have to type in "=Faction Name"
the faction window information is a big pita to try and get information from
here is dark reign for example - it returns the name of your faction type (ally, apprehensive etc)

/bcaa //faction
/noparse /bcaa //bc ${Window[FactionWnd].Child[FAC_FactionList].List[${Window[FactionWnd].Child[FAC_FactionList].List[=Dark Reign]},2]}
/bcaa //timed 5 /echo ${Window[FactionWnd].DoClose}
Jun 7, 2020
@Sic now that is a very very interesting insight.

It carries some of the thoughts from back when looked at quests.

The game isn't populating the structures until the window has been opened at least once, then the information is there.
On a F2P live account, I've tried:-
/echo ${Window[FactionWnd].Child[FAC_FactionList].Items}

In a session that hasn't had the faction window opened, gets 0 returned. Open and close the faction window, and then retry, get 614 returned.

That gave another pause for thought.

Previously, I thought I'd need to have the window, select the expansion (left panel) so the several factions from that expansion appear in the right panel. Then iterate over that list until find the one I was interested in and return the results. WRONG!
Your example has shown can go directly to the FAC_FactionList, and get details on any of 614 factions immediately.

Looking more at your example, I see you plucked column 2. The XML defines that as "Reaction". 1st column is "Faction Name" and 3rd column is "Standing".

This is great stuff, and helps get going in a positive direction!

@GoldenFrog @ChatWithThisName thanks for your comments, and more so, the PMs as well. Appreciated.
Lots to look over, and keep full of mischief for a few hours.
Jun 7, 2020
At a high level, it looked that Factions and Achievements had a similar design behind them.
Categories to click on the left panel, that gave a subset of information on the right panel.

Experience has shown that to look at quests and factions, you must first open the window at least once in that session to have the data populated. The same could be thought for Achievements.

Testing things yesterday after Sics post, had shown its possible to grab Faction detail ( scowl < indif > ally ) for a given name of faction. Can ignore the categories on left, and just go for it. Great. :)

Testing the 'Ach' macro today, where it recursively drills down to find and dump the information to file was interesting. It requires the window open and requires a category to be selected. Damn it. :(

The funny piece there of course, is that is how I thought Factions was going to behave. Select a category (expansion) and the right hand panel displays the factions for it. True in game, but not required for the faction search in macro. I had hoped there would be a similar idea for Achievements. Where look for "ACH_Item_Screen" objects and the matching title of the achievement interested in, without needing to select a category first.

Still many things to investigate and learn here.
Jun 7, 2020
Public ask for a quick query.
In a basic F2P account, there is 24 of 27 expansions active.​
Can I ask for feedback please on the following one line query, where you have 25, 26 or all 27 expansions active :-​
/echo ${Window[FactionWnd].Child[FAC_FactionList].Items}
( remember to have open and close the faction window, else it will return 0 ).
i.e. the account has bought, The Burning Lands, and / or, Torment of Velious, and / or, Claws of Veeshan.​
In your reply; please say which expansions you have and the number returned from the above query. It will output to your MQ2 window.​

Thank you in advance!


Freshly Squeezed
Sep 27, 2013
614 is the result on Rizlona for an account that owns CoV. I lied. I was on the wrong account.

Edit 2: Actually it's still 614. Non gold account, CoV purchased.
Jun 7, 2020
@Lemons @GoldenFrog @Hylander Thank you for taking the time to check and report back.

This experiment suggests the factions available are consistent on live servers, regardless of expansion ownership or account status.

When i checked Allakhazam faction list (here) it looked like over 700 were listed. First thoughts that may be due to the 3 expansions I don't own, that aren't gifted to accounts.
Although in the region of 100 faction names difference between what we can see in game with MQ in that FAC_FactionList compared to what Allakhazam detail.

I'm guessing, Allakhazam is detailing factions we can't amend (raise/lower) by in game actions and aren't tracked in the tool. Or perhaps they have been retired and the information is out of date. Either way, it doesn't feel like something to concern about.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)