mIRC Home    About    Download    Register    News    Help

Print Thread
dialog: edit $readini(...),... is not working #64623 20/12/03 05:56 PM
Joined: Jun 2003
Posts: 13
P
Pilo Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Jun 2003
Posts: 13
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() ???

Re: dialog: edit $readini(...),... is not working #64624 20/12/03 06:20 PM
Joined: Feb 2003
Posts: 15
R
Rabbi Offline
Pikka bird
Offline
Pikka bird
R
Joined: Feb 2003
Posts: 15
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

Re: dialog: edit $readini(...),... is not working #64625 21/12/03 10:32 AM
Joined: Jun 2003
Posts: 13
P
Pilo Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: Jun 2003
Posts: 13
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...

Re: dialog: edit $readini(...),... is not working #64626 21/12/03 03:22 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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
}



/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com