Warrior124 Posted January 18, 2010 Report Share Posted January 18, 2010 This addon is a new version of the ff alias. What it does is it will attempt to locate the specified file in the directory where you are running mirc, and its subdirectories. If it doesn't find the file there it will attempt to locate the file where your mirc.ini file is located, and its subdirectories. If it still doesn't find the file it will create a variable for the file which will be good if creating a new file. Another thing about this new code is you can find/make a file with spaces in the directory, and/or filename. alias ff { var %getff $1- if (!%ff. [ $+ [ " $+ %getff $+ " ] ]) || (!$exists(%ff. [ $+ [ " $+ %getff $+ " ] ])) { if ($shortfn($findfile($nofile($mircexe),%getff,1))) set %ff. [ $+ [ " $+ %getff $+ " ] ] $ifmatch elseif ($shortfn($findfile($mircdir,%getff,1))) set %ff. [ $+ [ " $+ %getff $+ " ] ] $ifmatch else set %ff. [ $+ [ " $+ %getff $+ " ] ] " $+ $nofile($mircexe) $+ %getff $+ " } return %ff. [ $+ [ " $+ %getff $+ " ] ] } Link to comment Share on other sites More sharing options...
err0r Posted January 19, 2010 Report Share Posted January 19, 2010 Great work warrior123 Link to comment Share on other sites More sharing options...
JOhnson Posted January 19, 2010 Report Share Posted January 19, 2010 Great work warrior123 warrior123 ? ........ you been working to hard err0r Link to comment Share on other sites More sharing options...
Warrior124 Posted January 19, 2010 Author Report Share Posted January 19, 2010 Hey Buddy, Hate to be a pest... but does the %getff variable ment to be evaluated?? I just tried your new code, and it doesnt update the variable unless you evaluate the %getff variable when you set it... =) alias ff { var %getff = $1- if (!%ff. [ $+ [ " $+ [ %getff ] $+ " ] ]) || (!$exists(%ff. [ $+ [ " $+ [ %getff ] $+ " ] ])) { if ($shortfn($findfile($nofile($mircexe),%getff,1))) set %ff. [ $+ [ " $+ [ %getff ] $+ " ] ] $ifmatch elseif ($shortfn($findfile($mircdir,%getff,1))) set %ff. [ $+ [ " $+ [ %getff ] $+ " ] ] $ifmatch else set %ff. [ $+ [ " $+ [ %getff ] $+ " ] ] " $+ $nofile($mircexe) $+ [ %getff ] $+ " } return %ff. [ $+ [ " $+ [ %getff ] $+ " ] ] } Thanks buddy, Its a handy little function I feel Kind Regards, Daniel Actually it evaluates fine for me, but that extra = sign does the same thing, lol. Thanks, Daniel. warrior123 ? ........ you been working to hard err0r Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now