mIRC Home    About    Download    Register    News    Help

Print Thread
#159834 20/09/06 12:50 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
Code:
if ($isfile($Mircdirhelp.txt)) RUN $Mircdirhelp.txt


for safety incase the full directory has a space i should use:

Code:
if ($isfile($+(", $Mircdirhelp.txt, "))) RUN $+(", $Mircdirhelp.txt, ")


or no need?

#159835 20/09/06 12:56 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Usually you should use that, but in this case there's no need. mIRC will accept non-full pathnames and assume the file is in the mIRC directory. For example; $isfile(x.txt) is equivalent to $isfile($+(",$mircdir,x.txt"))

#159836 20/09/06 01:11 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks

#159837 20/09/06 07:59 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
so wherever i use $Mircdir,

i dont really need to use the $+(", ... , ") ?

#159838 20/09/06 08:06 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
You do if there are spaces in the filename. "x y z.txt", for example.

Identifiers don't need the text to be quoted though. $isfile(x y z.txt) is fine. It's commands that expect quoted text, eg; /write "x y z.txt" test

#159839 20/09/06 08:14 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
ahh i see now thanks.


Link Copied to Clipboard