1
Script Debug / Re: Issues with context menu
« on: March 14, 2016, 06:26:25 AM »
You shouldn't have to worry about actually clicking yourself. exevent popup still "works" in that it will open the context menu at 0,0 on your screen. You can use the conposx,y offsets to determine the line you need to click. I forget how many pixels there are per line, but it shouldn't interfere with your character because the context menu is opened nearly off the screen.
lol, also in looking at the EasyUO wiki regarding this, at version 252, the syntax function changed of this command. Instead of fixing the old syntax, it was changed for some reason. Frankly, I like the way it was intended to work better. *shrugs*
I just got done playing with this - BTW , I went back to a EUO ver 241 so I could keep the context menuitem selection parameter - I agree that the new option kinda stinks:) Anyways, there is a 12 pixel border at the top and bottom of the context menus, and each entry is 18 pixels tall. I believe that there is also a 12 pixel left hand border, but I just set my ContY offset to 15 and it worked. So :
To calculate line #4 for example : Get the ContX position on screen ; add 12 (for top border), Then I added ( (selection# - 1) * 18 ) + 9 to place me halfway down the 4th selection.
You can also use this to test how many context options there are (ContX Size - pull it from the xxx_yyy field) , then subtract 24 (borders) and divide by 18. So that way, if someone programs a selection #5 on a 3-item menu, you can error out.
LochLinn