mIRC Home    About    Download    Register    News    Help

Print Thread
#7031 17/01/03 04:58 PM
Joined: Jan 2003
Posts: 5
G
Grynch Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
G
Joined: Jan 2003
Posts: 5
I want mirc to check the main dir ( $mircdir )
for a file on start like (example: mysystem.ini) and if the file is not there for mirc to make this file

does anyone know how to do this or if it can even be done

#7032 17/01/03 06:29 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
on *:START: {
if (!$exists(filename)) {
commands ...
}
}

$exists(file/dir)
Returns $true if a file or dir exists and $false if it doesn't.

gemeau50

#7033 17/01/03 07:34 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Code:

on *:START:{
  if (!$isfile(mysystem.ini)) {
    writeini mysystem.ini Options Line1   1,0,0,0,1,1,0,2,645,0,1,1,0
    writeini mysystem.ini Options Line2   1,0,0,1,1,0,0,0,1,0,0,0,0,0,1,0,0
    writeini mysystem.ini Colors  Palette 1,2,3,4,5,6,7,10,12,13,14,15
  }
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard