mIRC Home    About    Download    Register    News    Help

Print Thread
$readini - check if item exists #6056 11/01/03 08:27 AM
Joined: Jan 2003
Posts: 5
W
wld Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Jan 2003
Posts: 5
Is there any possibility to check before doing a $readini if a item exists in a specified section?

Re: $readini - check if item exists #6057 11/01/03 08:44 AM
Joined: Jan 2003
Posts: 150
J
J0ke Offline
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
If this is what you wanted:

Code:
alias testini {
  if ($readini(mirc.ini, mIRC, $1)) { echo 4 $readini(mirc.ini, mIRC, $1) }
  else { echo 4 No value... for $1 }
}
now try:
/testini nick
/testini anick
/testini whatever


Go ahead, jump. 100,000 lemmings can't be wrong.
Re: $readini - check if item exists #6058 11/01/03 08:48 AM
Joined: Jan 2003
Posts: 5
W
wld Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Jan 2003
Posts: 5
Thats exact what i want. Thanx

Re: $readini - check if item exists #6059 11/01/03 10:56 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
No need for an alias, mirc has a built-in identifier that checks if topics/items exist (and more): $ini()


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