I'm not sure how much people mess around with MQ2 and TLOs, but for anyone interested, I wrote a quick macro to return all of the members for any TLO. Without getting into too much detail, a TLO is a top level object for MQ2 and is basically how you get a value returned for a query.
/echo ${Me.Race}
The TLO in this case is the ${Me} and the member is Race. There are 316 members that ${Me} can access and you can use this macro to identify or any TLO for that matter. This macro will watch for event triggers, this way you can pass a value to the subroutine to evaluate. If I want the members for ${Window} TLO, I supply that as part of the echo command.
I did make it only spit out 100 at a time, if there are more than 100 members it pauses the macro and you can display the next 100 by typing /mqp and hitting enter.
/echo gmember window
This lists all 36 members for the window TLO. If none of this makes sense, read the MacroQuest 2 wiki TLO section. Just wanted to post this in case anyone else can benefit from it.
#Event GetMember "[MQ2] gmember #1#"
Sub Main
/doevents
/return
Sub Event_GetMember(Line, Member)
/declare n int local
/echo Members for ${Member}
/for n 1 to 100
/if (${Type[${Member}].Member[${n}].Length}>0) /echo ${n}. ${Type[${Member}].Member[${n}]}
/next n
/if (${Type[${Member}].Member[101].Length}>0) {
/echo Type /mqp to iterate through the next 100 members
/mqp
/for n 101 to 200
/if (${Type[${Member}].Member[${n}].Length}>0) /echo ${n}. ${Type[${Member}].Member[${n}]}
/next n
}
/if (${Type[${Member}].Member[201].Length}>0) {
/echo Type /mqp to iterate through the next 100 members
/mqp
/for n 201 to 300
/if (${Type[${Member}].Member[${n}].Length}>0) /echo ${n}. ${Type[${Member}].Member[${n}]}
/next n
}
/if (${Type[${Member}].Member[301].Length}>0) {
/echo Type /mqp to iterate through the next 100 members
/mqp
/for n 301 to 400
/if (${Type[${Member}].Member[${n}].Length}>0) /echo ${n}. ${Type[${Member}].Member[${n}]}
/next n
}
/return