mIRC Home    About    Download    Register    News    Help

Topic Options
#205071 - 11/10/08 11:19 PM $readini problem
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
i using $readini for my protections, but i cant figure out hot to use the same line for all my protections, the only thing that change is the last value (marked with a ?), i use $pro to get the value from the file, the ini file looks like this:

[protection]
ctcp=Disabled
message=Disabled

amd the alias looks like:

alias pro {
return { $readini($mircdirscripts\ini\settings.ini,protection,?)
}
so i need to add the item i want to read, this is done while init a dialog. So is it a way to return the value the dialog looking for? tested with var %pro = ctcp . but no luck when i tested it.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#205072 - 11/10/08 11:53 PM Re: $readini problem [Re: sparta]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
How does the user know, by looking at the dialog what item is to be returned?
Personally, in the dialog, I would have a text item CTCP as ID 4 and the item where the information for that to be displayed as ID 5
Thus you could use something like
Code:
$readini($mircdirscript\ini\settings.ini,protection,$did(4))
for the CTCP information.


Top
#205073 - 11/10/08 11:59 PM Re: $readini problem [Re: RusselB]
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
On another note, $mircdir includes and ending slash (looks like you already know), but in order to combine $mircdir and the rest of the path, you must use: $+

Code:
$readini($mircdir $+ script\ini\settings.ini,protection,$did(4))

Top
#205075 - 12/10/08 12:11 AM Re: $readini problem [Re: Joe_Dean]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
how can i do that? i using a combo, the value that can be chosen are - High - Normal - Disabled . and it's on INIT i need the value for the $readini ..
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#205083 - 12/10/08 01:18 AM Re: $readini problem [Re: Joe_Dean]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
That is incorrect.
Code:
//echo -a $mircdir $mircdirscript
For me, it shows c:\mIRC c:\mIRC\script

Top
#205084 - 12/10/08 01:21 AM Re: $readini problem [Re: sparta]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Do you have a label at the top of the combo box to indicate what the combo box is for? If so, a slight alteration of my suggestion will suffice.

Top