mIRC Home    About    Download    Register    News    Help

Print Thread
M
Mail
Mail
M
I am trying to get the information from a hash table and place it into a dialog list box.
One: Is this even possible?
Two: If possible, Suggestions would be appreciated.

I would like to be able to achieve this without using variables. I am starting to think its not possible without using them though.

N
NeUtRoN_StaR
NeUtRoN_StaR
N
example:
Code:
on *:dialog:as:init:*:{
  var %as6awyn = 1
  while ($hget(away,%as6awyn).item != $null) {
    did -a as 22 $hget(away,%as6awyn).data
    inc %as6awyn
  }
  }

Last edited by NeUtRoN_StaR; 11/02/06 05:38 AM.
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
1) It is possible
2) your code would look something like
Code:
 did -a <dialog> <id> $hget(<table>,<item>)
 


This is a very basic example of how you could do it.

If you want more details, supply the code for the dialog set-up and how the items are stored in the hash table

M
Mail
Mail
M
Thanks Neutron, That worked fine. I thought it was possible. Thanks also Russel for your response as well.

Last edited by Mail; 11/02/06 06:28 AM.
Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
You could use something like this, assuming the hash table name is "somehash", your dialog name is "somedialog" and the listbox ID is 5:
Code:
  hsave -n somehash somehash.temp
  filter -fo somehash.temp somedialog 5
  .remove somehash.temp


I posted this not because it doesn't use variables (which is a very weird requirement, why wouldn't you want to use variables?), but because it's faster for large tables. However this method is limited; you can only dump the items' data in the listbox, you can't include the item names or do something with the data before you output it (unless you use /filter's -k switch in the second case).


Link Copied to Clipboard