mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
How can i fix this coding if the txt file can't be found in the scriptdir

alias openlist {
if ($exists($findfile($mircdir,acronyms.txt,1)) == $true) { run notepad.exe " $+ $findfile($mircdir,acronyms.txt,1) $+ " }
else {
echo 4 -a Unable to find the acronyms.txt file in your directory
}
}

Joined: Mar 2004
Posts: 457
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
well, the $exists is not needed since $findfile would return $null if the file didn't exist.
Remove the $exist and change it to
if ($findfile($mircdir,acronyms.txt,1)) { run etc

other than that i can't see any errors.

Joined: Dec 2002
Posts: 174
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 174
Silly thing still won't work it says Unable to find the acronyms.txt file in your directory

of course it won't as the file don't exist lol

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Code:
alias openlist {
  if $isfile(acronyms.txt) { run acronyms.txt }
  else echo 4 -a Unable to find the acronyms.txt file in your directory
} 


Gone.

Link Copied to Clipboard