mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2009
Posts: 9
C
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Jan 2009
Posts: 9
Hello all. Looking for a little help here i have been trying to get this thing to work for a few days now. Now i'm wondering if its even possable. Am hoping someone here has the answer.

I am making a popup menu for a toolbar button. The menu lists servers from the servers.ini file. When i use the $submenu to create the menu items i cannot return a : $chr(58) to be displayed on the menu. can this be accomplised using the $submenu?

Here is what i have..

Code:
menu @TBC.bp.Connect {
  New Ser&ver Window:/server -n
  -
  Recent Servers
  .server info here:noop
  .-
  .&Clear History:noop
  -
  $submenu($TBC.bp.ListServers($1))
}

alias TBC.bp.ListServers {
  if ($1 == begin) { 
    var %serverdata = $readini(servers.ini, n, servers, n0)
    var %desc = $left($gettok(%serverdata,1,58), $calc($len($gettok(%serverdata,1,58)) - 6))
    var %serv = $gettok(%serverdata,2,58)
    var %port = $left($gettok(%serverdata,3,58), $calc($len($gettok(%serverdata,3,58)) - 5))
    var %group = $gettok(%serverdata,4,58)
    return %group $+ $($+($,chr(58)),2) %desc :/server %serv %port

 }

  if ($1 isnum 1-15) { 
    var %serverdata = $readini(servers.ini, n, servers, n $+ $1)
    var %desc = $left($gettok(%serverdata,1,58), $calc($len($gettok(%serverdata,1,58)) - 6))
    var %serv = $gettok(%serverdata,2,58)
    var %port = $left($gettok(%serverdata,3,58), $calc($len($gettok(%serverdata,3,58)) - 5))
    var %group = $gettok(%serverdata,4,58)
    return %group $+ $($+($,chr(58)),2) %desc :/server %serv %port
  }
}


Note: If someone can get this to work it will be added to the script i'm making and you'll receive credit for your work! :-)

Joined: Jul 2006
Posts: 4,019
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,019
There is no way to have a ':' be displayed on a menu, use another character smile


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard