Post
by Mckorr » Fri May 16, 2003 10:17 am
Hmm, brief explanation of parsing...
All window locations and whatever is in them (Head, Done button, Auto equip area, Combine button, etc.) is the result of calculations on EQ's part based on 3 files.
Character_##.ini stores screen resolution.
UI_Character_##.ini stores base window XY for the various screen resolutions, and the name of the UI skin currently in use.
EQUI_whatever.xml stores the location of items within the windows, and the size of those areas.
To do "/click left destroy", i.e. we want to left click on the inventory destroy button, we need to find the location of destroy.
So, we get the screen resolution from the character.ini file. We use that to find the base XY coordinates of the inventory window. We then go to the skin directory (or default if no custom skin exists) and find the location and size of the destroy button. We add it all up (well, we use half the size values so we hit the center) and that gives us the XY we want to click on.
We then move the mouse to those coordinates, and execute a left click.
Basically, parsing is just finding the coordinates we want to click on, without having to actually find them using $mouse(X) and $mouse(Y), then window EQ, edit the macro, etc.
The current direction of the parser uses a file, locations.txt, which stores some basic info on the locations we might want to click on. It's designed to be easily edited so that the end user can add his own locations. The current test version of locations.txt has maybe 5 locations in it, just the ones I'm using to test the parser code.