mIRC Homepage
Posted By: MTec89 drop down - 30/07/03 03:49 PM
does someone have a drop down menu with all the charecters of the default dialog font in it? i really dont want to go through makeing it if someone has it done already...
Posted By: c0ldfusi0n Re: drop down - 30/07/03 04:49 PM
It's not like it's hard...
Code:
;Syntax: /loadchars <dialog name> <dialog ID>
alias loadchars {
  if ($2) {
   var %i = 1
   while (%i <= 255) { .did -a $1 $2 $chr(%i) | inc %i }
  }
  else { did -a $1 $2 Error }
}

Posted By: Rich Re: drop down - 30/07/03 04:57 PM
Do you mean something like this:
Code:
dialog charlist {
  size -1 -1 15 11
  option dbu
  combo 1, 0 0 15 150, size drop result
  button "&OK",2, 0 14 15 25,OK
}
on *:dialog:charlist:init:*:{
  var %i = 33
  while (%i < 256) { did -a $dname 1 $chr(%i) | inc %i }
  did -c $dname 1 1
}
?
Posted By: MTec89 Re: drop down - 30/07/03 04:57 PM
i though i was going to have to do

did -ra dialog id a
did -r dialog id b
did -r dialog id c

or whatever...

but thinking about it, i dont want to have letters or numbers in the list, how can i filter them out?
Posted By: MTec89 Re: drop down - 30/07/03 04:59 PM
yes sort of, exept for the letters and numbers, i dont want those
Posted By: Rich Re: drop down - 30/07/03 05:06 PM
Replace the while loop with this:
Code:
  while (%i < 256) { 
    if ($chr(%i) !isalnum) did -a $dname 1 $ifmatch
    inc %i 
  }

Over here it still shows a lot of black boxes, but I suppose you want those in because they could be valid characters depending on the font used.
© mIRC Discussion Forums