mIRC Home    About    Download    Register    News    Help

Print Thread
Creating popups with $readini() #94121
14/08/04 12:54 AM
14/08/04 12:54 AM
Joined: Sep 2003
Posts: 19
N
nyght_wulf Offline OP
Ameglian cow
nyght_wulf  Offline OP
Ameglian cow
N

Joined: Sep 2003
Posts: 19
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?


w00f!
Re: Creating popups with $readini() #94122
14/08/04 01:58 AM
14/08/04 01:58 AM
Joined: Mar 2004
Posts: 457
Behind you
D
Danthemandoo Offline
Fjord artisan
Danthemandoo  Offline
Fjord artisan
D

Joined: Mar 2004
Posts: 457
Behind you
it should work, i can't think of any reason it doesn't other than the line in $readini is wrong.

Re: Creating popups with $readini() #94123
14/08/04 03:24 AM
14/08/04 03:24 AM
Joined: Sep 2003
Posts: 19
N
nyght_wulf Offline OP
Ameglian cow
nyght_wulf  Offline OP
Ameglian cow
N

Joined: Sep 2003
Posts: 19
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. )


w00f!
Re: Creating popups with $readini() #94124
14/08/04 04:40 AM
14/08/04 04:40 AM
Joined: Mar 2004
Posts: 457
Behind you
D
Danthemandoo Offline
Fjord artisan
Danthemandoo  Offline
Fjord artisan
D

Joined: Mar 2004
Posts: 457
Behind you
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.

Re: Creating popups with $readini() #94125
14/08/04 05:10 AM
14/08/04 05:10 AM
Joined: Sep 2003
Posts: 19
N
nyght_wulf Offline OP
Ameglian cow
nyght_wulf  Offline OP
Ameglian cow
N

Joined: Sep 2003
Posts: 19


w00f!
Re: Creating popups with $readini() #94126
14/08/04 07:11 AM
14/08/04 07:11 AM
Joined: Dec 2002
Posts: 230
G
greeny Offline
Fjord artisan
greeny  Offline
Fjord artisan
G

Joined: Dec 2002
Posts: 230
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

Re: Creating popups with $readini() #94127
14/08/04 10:24 AM
14/08/04 10:24 AM
Joined: Sep 2003
Posts: 19
N
nyght_wulf Offline OP
Ameglian cow
nyght_wulf  Offline OP
Ameglian cow
N

Joined: Sep 2003
Posts: 19
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. ..


w00f!