Was just playing with these subs a bit and decided to add something that Khameleon was talking about way back on uocoders. He was thinking it would be nice to allow for the script to track not only the visible list item, but also an additional piece of data that won't be displayed. So here's a sample of what I'm talking about:
set %font_arial MS , #SPC , Ariel
gosub showEUOMenu1
gosub TM_CreateList List Newlist1 4 4 345 289 White WindowText %font_arial 8
set #LPC 100
repeat
finditem * G_18
if #FINDKIND <> -1
{
event property #FINDID
str pos #PROPERTY $
set #STRRES #STRRES - 1
str left #PROPERTY #STRRES
gosub TM_AddToList Newlist1 #STRRES #FINDID
ignoreitem #FINDID
}
until #FALSE
stop
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title Test
menu Window Color BtnFace
menu Window Size 442 298
menu Show 421 270
return
;--------- EasyUO Menu Designer Code End ---------
This code will save all incoming items it finds on the ground and places them into the list you can see. It also makes a note of the #FINDID associated with the item. You can go back later and do searches on either the "Items" information or the "Tag" information. Where:
Item = displayable
Tag = non-displayable
So specifically, the syntax to add the item text and tag looks like:
gosub TM_AddToList Newlist1 #STRRES #FINDID ; added the 3rd argument (the Tag)
About NODRAW lists:
Normally these subs are meant to replace instances of menu list or menu combo, but there are times when you might want to use a list as a data structure to generally hold information. For that you can:
gosub TM_CreateList NODRAW Newlist2 110 10 100 100 White WindowText %font_arial 8
This will create a list, but not associate it with anything on the screen. Be sure to have a unique name, i.e. you cannot have a NODRAW list named NewList2 and a Combo List NewList2.
Be looking for version 2.1 of this set of subs. I'm playing with them now and will post them soon. Not that anyone uses them, but what the heck.