mIRC Homepage
Posted By: Pilo dialog: edit $readini(...),... is not working - 20/12/03 05:56 PM
Code:
alias F5 { 
  set %test.dia works
  dialog -amv dialog.test dialog.test
}

dialog dialog.test {
  title "test"
  option dbu
  size -1 -1 150 100
  [color:green]edit %test.dia, 665, 10 10 40 15, autohs[/color]
  [color:red]edit $readini(mirc.ini, mirc, email), 666, 10 30 40 15, autohs[/color]
}


If I remark the red line with the $readini() the dialog appears and shows the 'works'...
with the red line it comes the following error message:
* /dialog: 'dialog.test' invalid table, in 'edit' (line 3, script.mrc)
...but why...the green line with the %test.dia-variable works perfect after 'edit'...
and //echo -at $readini(mirc.ini, mirc, email) prints out my mIRC-email...its not $null...

what must I do to get a working script that prints out the email in the 'edit'-line with $readini() ???
did you try following way??

alias F5 {
set %test.dia $readini(mirc.ini.mirc,email)
dialog -amv dialog.test dialog.test
}

or

on *:dialog:dialog.test:init:0: {
did -o $dname 665 1 $readini(mirc.ini,mirc,email)
}

or after opening dialog

do //did -o dialog.test 665 1 $readini(mirc.ini,mirc,email)

smile
Thanks Rabbi 4 help...it works now...but I'm still wondering that $readini() is not displayed after 'edit'...cause 'edit $version...' works 4 example...
That's because of the commas used as parameter separators in $readini(). Apparently mirc gets confused and considers those commas as separators that belong to the edit definition. You can use something like:
Code:
alias mircemail return $readini($mircini,mirc,email)
dialog dialog.test {
  title "test"
  ...
  edit $mircemail, 666, 10 30 40 15, autohs
}

© mIRC Discussion Forums