mIRC Homepage
Posted By: nyght_wulf Creating popups with $readini() - 14/08/04 12:54 AM
im creating a custom away script (don't like all the others i have seen.. not much for multi-server suport) and im having trouble creating the poup menu.
here is what i have so far:
Code:
menu channel {
  Settings $readini(C:\mirc\text\ini\main.ini,n,$network,back_nick)
  .AWAY:/ascript
  .BACK:/ascript
  .-
  .NS-Ident:/ns identify $readini(C:\mirc\text\ini\main.ini,n,$network,ns_pass)
} 


/ascript is the command for the core part of the script (that works, arleady checked it) bur what i want to do is on the 'main' level of the menu, have the nick displayed for that server by reading it out of the appropriate section of the ini file instead of having to code up a seperate section for each server.

the 'back_nick' section of the ini contains the standard nickname.
is there maybe some command switch im missing that makes the 'menu' processe the identifiers, or is there something im missing yet?
Posted By: Danthemandoo Re: Creating popups with $readini() - 14/08/04 01:58 AM
it should work, i can't think of any reason it doesn't other than the line in $readini is wrong.
Posted By: nyght_wulf Re: Creating popups with $readini() - 14/08/04 03:24 AM
http://wulfpawz.dyndns.org:8000/popup_output.jpg

there is a pic of what is generated, the section outlined in red is what hapens

( http://img.photobucket.com/albums/v152/nyght_wulf/popup_output.jpg << same picutre, different location, just incase you can't to the above listed one. )
Posted By: Danthemandoo Re: Creating popups with $readini() - 14/08/04 04:40 AM
hhmm, i see what you mean. if you add the full path (C:\mirc) then it just ignores the "settings $readini" bit. So indeed it does look like a bug.

EG.
menu channel {
Settings $readini(C:\mirc\mirc.ini,text,nothin)
.AWAY:/ascript
.BACK:/ascript
.-
.NS-Ident:/ns identify $readini(C:\mirc\text\ini\main.ini,n,$network,ns_pass)
}
ignores the "Settings $readini(C:\mirc\mirc.ini,text,nothin)" and shows:

away
back
-
ns-ident

in the main menu. However, changing it to "$readini(mirc.ini,text,nothin)" and it works fine.
Posted By: nyght_wulf Re: Creating popups with $readini() - 14/08/04 05:10 AM
yup, by changing it to 'text\ini\main.ini' it worked perfectly:

http://wulfpawz.dyndns.org:8000/popup_output_fixed.jpg
or
http://img.photobucket.com/albums/v152/nyght_wulf/popup_output_fixed.jpg

Posted By: greeny Re: Creating popups with $readini() - 14/08/04 07:11 AM
mIRC tries to use the part after the colon as the command, so in reality the parser looks at it like this:

Popup entry: "Settings $readini(C"
Command: "\mirc\mirc.ini,text,nothin)"

So it obviously does not work. I wouldn't exactly call it a bug, since it is known that a colon delimits popup entries and their respective commands.
Khaled could of course look if the colon is inside an identifier - it's not that I don't want this problem fixed - I just don't see it happen as it might raise other problems.

A way around it is of course using a custom alias to do the $readini work smile
Posted By: nyght_wulf Re: Creating popups with $readini() - 14/08/04 10:24 AM
ahhhhhh laugh

i 've been talking about this with a few other scriptors, that didn't even ocure to us :tongue:

now i kinda feel stupid >.< ahwell. ..
© mIRC Discussion Forums