Project

General

Profile

Feature - New #1648

Access to currency

Added by Kannkor almost 8 years ago. Updated almost 8 years ago.

Status:
Implemented
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2016-07-11
Due date:
% Done:

0%

Estimated time:
vbulletin_issue_id:

Description

If you open your character window (C by default, or EQ2 button -> Character)

Then on the left click on 'Currency'

I want to be able to read this window.

 

Here's some of the basics that may help..

You have to have opened the currency window once before this will populate:

echo ${EQ2UIPage[Mainhud,Persona].Child[page,Persona.MainPage.CurrencyPage.currencylist.scrollpage].NumChildren}

Gives the # of items in the list. But we can't figure  out a way to read them.

Here is the xml stuff (thanks Pork for getting it)

 -<Page Size="325,552" ScrollExtent="325,552" Name="CurrencyList" PackSize="a,a" BackgroundOpacity="1.000" RStyleDefault="/CommonElements.RoundedGrouper.data.rect" DragType="icon" DragAccepts="icon">

            <Scrollbar Size="22,531" ScrollExtent="22,531" Name="Scroll" MinimumSize="22,60" Location="292,11" PackSize="fixed,absolute" Style="/CommonElements.ScrollbarVertical.data.style" PackLocation="right,top" MaximumSize="22,16384" HideIfUnnecessary="false" DropToParent="true" Control="ScrollPage" ArrowPressSound="sounds/button"/>


             -<Page Size="303,531" ScrollExtent="303,531" Name="ScrollPage" Location="11,11" PackSize="absolute,absolute" BackgroundColor="#2D251C" AbsorbsInput="false" ScrollSize="33,33" DropToParent="true">

                  <Icon Size="31,31" ScrollExtent="31,31" Name="row Icon" TreatAsButton="true" MouseOverColor="#FFFF00" IconStyle="/IconStyles.item_list" BackgroundTint="#000000"/>

                   <Text Size="210,31" ScrollExtent="210,31" Name="row Item Name" Location="35,0" PackSize="a,f" Font="/TextStyles.Normal.NormalStyle" TextAlignmentVertical="Center" DropToParent="true">:a8d7734cfe9e747a:[DEVL]Currency Name</Text>

                    <Text Size="42,31" ScrollExtent="42,31" Name="row Quantity" Location="235,0" PackSize="f,f" PackLocation="right,top" Font="/TextStyles.Normal.NormalStyle" TextAlignmentVertical="Center" TextAlignment="Right" DropToParent="true" ShrinkFontToFit="true">:a8d7734cdc88af15:100</Text>

                    <Image Size="303,31" ScrollExtent="303,31" Name="row Selection" PackSize="absolute" BackgroundColor="#4A404A" BackgroundOpacity="1.000" DropToParent="true"/>

              </Page>

 

Things I'd like:

Way to open the currency tab. (Even if it's a way to open the Character window, then 'click' the Currency tab).

Way to read the Currency tab itself.

#1

Updated by Amadeus almost 8 years ago

  • Status changed from New to Implemented

This will require version 20160707.0007 or later (which is currently the isxeq2 'test' build until tomorrow's patch.)

    variable int Counter = 1
    variable index:collection:string Categories
    variable iterator CategoriesIterator
    variable int CategoryCounter = 0
    
    ;; ensure that no windows are open
    eq2execute /close_top_window
    wait 5
    eq2execute /close_top_window
    wait 5
    eq2execute /close_top_window     ;; Open Persona Window
    eq2execute /togglepersona
    wait 5
    
    ;; Ensure that CategoryListBox is still child #2
    if (!${EQ2UIPage[Mainhud,Persona].Child[page,Persona.Categories].Child[2].Type.Equal["Listbox"]} ||
        !${EQ2UIPage[Mainhud,Persona].Child[page,Persona.Categories].Child[2].GetProperty[Name].Equal["CatetoryListbox"])
    {
        echo "The EQ2UI has changed.  The 'CategoryListbox' is no longer child 2 of Persona.Categories.  This script will need to be updated."
        return
    }
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Open the "Currency" Tab
    EQ2UIPage[Mainhud,Persona].Child[page,Persona.Categories].Child[2]:GetOptions[Categories]
    Categories:GetIterator[CategoriesIterator]    
    if (${CategoriesIterator:First(exists)})
    {
        do
        {
            if (${CategoriesIterator.Value.FirstKey(exists)})
            {
                if (${CategoriesIterator.Value.Element["Name"].Equal["Currency"]})
                {
                    EQ2UIPage[Mainhud,Persona].Child[page,Persona.Categories].Child[2]:SetProperty[SelectedItemIndex,${CategoriesIterator.Value.Element["v0"]}]
                }
            
                ;; Spew Values (if desired)
                ;do
                ;{
                ;    echo "Option #${CategoryCounter}::  '${CategoriesIterator.Value.CurrentKey}' => '${CategoriesIterator.Value.CurrentValue}'"
                ;}
                ;while ${CategoriesIterator.Value.NextKey(exists)}
                ;echo "------"
            }
            CategoryCounter:Inc
        }
        while ${CategoriesIterator:Next(exists)}
    }
    else
    {
        echo "It appears that the Persona category list is empty!"
        return
    }
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; Spew Information within the Currency tab
    if (${EQ2UIPage[Mainhud,Persona].Child[page,Persona.MainPage.CurrencyPage.currencylist.scrollpage].NumChildren} > 0)
    {
        do
        {
            if (${EQ2UIPage[Mainhud,Persona].Child[page,Persona.MainPage.CurrencyPage.currencylist.scrollpage].Child[${Counter}].Type.Equal["Text"]})
            {
                echo "${Counter}: eq2text (${EQ2UIPage[Mainhud,Persona].Child[page,Persona.MainPage.CurrencyPage.currencylist.scrollpage].Child[${Counter}].GetProperty[LocalText]})"
            }
            else
            {
                ;echo "${Counter}. [${EQ2UIPage[Mainhud,Persona].Child[page,Persona.MainPage.CurrencyPage.currencylist.scrollpage].Child[${Counter}].Type}]"
            }
        }
        while (${Counter:Inc} <= ${EQ2UIPage[Mainhud,Persona].Child[page,Persona.MainPage.CurrencyPage.currencylist.scrollpage].NumChildren})
    }
    ;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Also available in: Atom PDF