Project

General

Profile

 

Also available in: PDF

How to acquire all data options for a DropDownBox

To use this test script, create a file in your /innerspace/scripts folder called DDBoxTest.iss and place the entire text below. Then, you can run the script by typing the following command in the InnerSpace console (while in the game): run DDBoxTest


function main()
{
    variable index:collection:string Options
    variable iterator OptionsIterator
    variable int OptionCounter = 0
    
    ; You will need to be in a guild with the guild window open for this script to work.
    EQ2UIPage[mainhud,guild].Child[DropDownBox,Guild.MainTabPage.MembersPage.ShowMemberSelection]:GetOptions[Options]
    Options:GetIterator[OptionsIterator]
    
    echo "The 'ShowMembersSelection' DropDownBox has ${Options.Used} Options"
    
    if (${OptionsIterator:First(exists)})
    {
        do
        {
            if (${OptionsIterator.Value.FirstKey(exists)})
            {
                do
                {
                     echo "Option #${OptionCounter}::  '${OptionsIterator.Value.CurrentKey}' => '${OptionsIterator.Value.CurrentValue}'"
                }
                while ${OptionsIterator.Value.NextKey(exists)}
                echo "------"
            }
            OptionCounter:Inc
        }
        while ${OptionsIterator:Next(exists)}
    }
}


To set a DropDownBox to a particular value, one would iterate through the "options" (as shown above), and then when the option "CurrentKey" and/or "CurrentValue" matches the goal, use the "Set" method using the current Counter (zero-based).  For example:  EQ2UIPage[mainhud,guild].Child[DropDownBox,Guild.MainTabPage.MembersPage.ShowMemberSelection]:Set[${OptionCounter}]