|
03-03-2006, 07:47 AM
|
A Young Mystail Rat
|
|
Join Date: Dec 2005
Server: Antonia Bayle
Posts: 6
|
|
Extracting broker data?
Hi,
Let me start by saying that i have zero experience with EQ2 UI moding, but have had some experience with the World of Warcraft API (which seems to be considerably more powerful).
Would it be possible to extract data from the broker window in any manner? I was thinking along the lines of having a button that when pressed, pasted the selected item/price/seller into the chat window - the resulting output could then be parsed from the log file. Is this possible at all? Or totally impossible within EQ2?
Thanks for any advice.
|
03-03-2006, 08:50 AM
|
A Griffon
|
|
Join Date: Apr 2005
Server: Mistmoore
Posts: 541
|
|
Don't think it's possible.
|
03-03-2006, 12:23 PM
|
|
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
Possible, but a PITA and would likely make the item selection somewhat flaky.
Take a look at how my Store window passes the item name to the "Find It" button. A similar mechanism could pass a concatinated list in 1 line to the chat input. You'd need to select each item and hit return. You'd also have to page through long list since there's no known way to grab more than the current 8 items at a time. Hardcoded returns in the data may be a problem, might also provide a way to auto return the chat input.
|
03-03-2006, 04:16 PM
|
A Young Mystail Rat
|
|
Join Date: Dec 2005
Server: Antonia Bayle
Posts: 6
|
|
Thanks for the advice! Being able to click a button and have a concatinated list of the 8 items/prices/sellers pasted into chat definately has potential. Could i impose again and ask how you would actually have the button paste the info into chat? I assume it would be something in the OnPress attribute.
Thanks in advance.
|
03-04-2006, 02:11 AM
|
A Young Mystail Rat
|
|
Join Date: Dec 2005
Server: Antonia Bayle
Posts: 6
|
|
Had a go at it myself: created a new button in the market search page (where the Find Items + Reset buttons are). Within the OnPress attribute i had the code:
Parent.Parent.Parent.Parent.MainHUD.MainChat.Chatpage.ChatFrame.ChatInput.Text = Parent.Parent.ResultsPage.Table.ScrollPage.row Item Name.LocalText
Unfortunately this didnt seem to work at all and i couldn't find any usefull debugging information within the ui.log file.
Could anyone with some more experience possibly tell me what the problem is? Needless to say, the problem is that i am either setting the text into the chat window wrong, extracting the text from the market window wrong, or possibly (and most likely!) both.
Thanks.
|
03-04-2006, 06:06 PM
|
|
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
Played with this a bit... sadly it seams the selected item name and price data includes an invisible object that wont pass through chat. I can get it to paste the data into the chat input just fine, but getting it to pass through chat requires manually deleting the invisible object preceeding the price.
When I have more time, I may try to decifer how the lists are dealing with selected item indexes. If I can figure that out, it might be possible to pull the data directly from the dataSource. All of this is hardcoded, so its doubtfull I'll stumble upon the hidden properties.
|
03-04-2006, 10:01 PM
|
A Young Mystail Rat
|
|
Join Date: Dec 2005
Server: Antonia Bayle
Posts: 6
|
|
Thanks for trying
I have also been playing with it today, and having a lot of problems!
Firstly i tried putting:
Parent.Parent.Parent.Parent.MainHUD.MainChat.Chatpage.ChatFrame.ChatInput.Text = 'foo'
in the OnPressed attribute. When i clicked the button nothing would happen. But if i logged out to character select, and back in, then foo would appear in all my chat windows as required. Is there a way to 'refresh'/'reload'/'revalidate' the windows objects without having to totally reload the UI?
You mention in your post that you can get it to 'paste the data into the chat input just fine': what does this mean, and what code did you use to do this?
' but getting it to pass through chat requires manually deleting the invisible object preceeding the price' - I appologise but im not exactly sure what this means. What do you mean by, 'getting it to pass through chat'?
Thanks!
|
03-04-2006, 11:59 PM
|
|
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
First off, when spanning top level pages (from say the inventory branch over to the MainHud branch) its inportant to know the top lvl pages all get replaced with _HUD when in-game. Remove the MainHud node from your pathing and you should have more success.
No there's no way to refresh windows in game short of relogging or using /loadui (which usually crashes the client).
I added an invisible button over the lblSelectedNameAndPrice object with the following event handle...
Code:
OnActivate="Parent.Parent.Parent.MainChat.Chatpage.ChatFrame.ChatInput.Text=parent.lblSelectedNameAndPrice.LocalText"
This adds something like the following to the chat input field
itemname
{}price
The {} represents an invisible character that causes the input to fail when ENTER is pressed, resulting in nothing actually being sent through chat. Manually deleting the invisible character allows the data to be sent through chat, but having to remove it manually prerty much defeats the whole automation thing. Might as well type the data at that point.
|
03-05-2006, 06:26 AM
|
A Young Mystail Rat
|
|
Join Date: Jan 2005
Server: Antonia Bayle
Posts: 5
|
|
Quote:
Originally Posted by Zonx
First off, when spanning top level pages (from say the inventory branch over to the MainHud branch) its inportant to know the top lvl pages all get replaced with _HUD when in-game. Remove the MainHud node from your pathing and you should have more success.
|
Ahhh thx for sharing this
I'm currently working on a new QuestJournal and it was driving me crazy not to be able sending a variable to another toplevel window. Now it works like charm
@mkb102
try the following code to add text to the ChatInput window:
Code:
parent.parent.parent.MainChat.ChatPage.ChatFrame.ChatInput.LocalText=foo
As you can see I' using LocalText instead of Text and it works fine for me
|
03-05-2006, 06:44 AM
|
|
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
/nod
Pulling/setting LocalText is generally safer. In some cases the Text atribute may not match the LocalText (what's on-screen) atribute and may not be passed properly by hard-coded stuff.
Last edited by Zonx : 03-05-2006 at 06:46 AM.
|
03-05-2006, 06:50 AM
|
A Young Mystail Rat
|
|
Join Date: Dec 2005
Server: Antonia Bayle
Posts: 6
|
|
Thanks for the help guys! Would have never worked it out without you! What i found out Zonx is that even though the data you get from parent.lblSelectedNameAndPrice.LocalText doesnt 'pass through' chat. It does in fact get entered into your eq2input_<charactername>.txt log file!
It is now accessible so that is my initial problem solved!
A couple of things which would be nice though:
1) Is it possible to find the Sellers name as well? I was thinking that instead of using the SelectedPage.lblSelectedNameAndPrice, you could use the ResultsPage.Table.ScrollPage.row Item Name. But there is a problem here. I am having problems referencing this property because "row Item Name" has got spaces in it, and therefore trying to call ResultsPage.Table.ScrollPage.row Item Name.LocalText is invalid (i assume!).
I tried ResultsPage.Table.ScrollPage.'row Item Name'.LocalText but that didnt seem to work either. Any advice?
2) I don't believe its possible but are you able to get data on all 8 of the currently viewable items, or just the selected one? Selecting each and every item is a slow process .
Thanks!
|
03-05-2006, 07:17 AM
|
|
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
hehe, I was wondering if it got logged anyways
Try
'ResultsPage.Table.ScrollPage.row Item Name.LocalText'
quote the entire path
The difficulty you'll run into is in addressing the seller of the selected row. Since these aren't actually tables or any of the normal UI list objects, you prety much have to stumble upon a hidden index property (if its even accessable from XML).
If you can discover an index property or better yet a datasource feeding the results page, you could easily concatinate all the results into 1 chat entry. If this were a standard list, It'd work something like this...
Code:
parent.parent.parent.MainChat.ChatPage.ChatFrame.ChatInput.LocalText=datasource.selecteditemindex.0.name ## ' ' ## table.datasource.selecteditemindex.0.price ## ' ' ## datasource.selecteditemindex.0.seller ## '
' ## datasource.selecteditemindex.1.name ## ' ' ## table.datasource.selecteditemindex.1.price ## ' ' ## datasource.selecteditemindex.1.seller ## '
' ## datasource.selecteditemindex.2.name ## ' ' ## table.datasource.selecteditemindex.2.price ## ' ' ## datasource.selecteditemindex.2.seller ## '
'
etc
Above code may not be exactly right, but something like that.
|
03-05-2006, 08:20 AM
|
A Young Mystail Rat
|
|
Join Date: Dec 2005
Server: Antonia Bayle
Posts: 6
|
|
Hrm,
'ResultsPage.Table.ScrollPage.row Item Name.LocalText'
'ResultsPage.Table.ScrollPage.row Special.LocalText'
'ResultsPage.Table.ScrollPage.row Price.LocalText'
'ResultsPage.Table.ScrollPage.row Seller.LocalText'
None of these seem to work. After performing a search and clicking on an item they still just seem to return "Missing Item Name" or the whatever the default string they are set to is. I will just stick to using SelectedPage.lblSelectedNameAndPrice.LocalText i guess .
As for discovering the datasource which is feeding the table. Is there an easy method of doing this? Or would i just have to totally guess a the name of the datasource until i stumbled accross it i.e.
Table.datasource
Table.resultsdatasource
Table.resultssource
etc..
|
03-05-2006, 10:38 PM
|
|
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
That's the trouble with hard-coded stuff, no clue how they are generating the table. If it works like a standard table, the table object would have a datasource value you could pull into a text field to determine the datasource name.
Assuming you find a datasource, you'll need to determine what atributes are on the data objcets inside it. Chances are they match the field names in the table, but they may not.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:20 PM.
|
|