Travis
Guest
When mIRC changed to version 6.31 or 6.32 Khaled decided to support Windows Vista by making your default mirc directory in your Users\Application Data\Roaming folder ... Why? I haven't asked but I don't see any good reason for it.
Anyways, this can be a major pain in the butt when allowing others to use your scripts. I have seen other ideas in the past to deal with this but always ignored them until I had to deal with it. Now that I have to deal with it this is what I made.
alias dir { return $qt($+($nofile($mircexe),$1)) }
Ex: /run $dir(songs\file.mp3)
Using quotes ($qt) is up to you. I do that because some people like to runt heir mirc fromt he desktop.
I know other people had other ways of doing this ... Warrior ... Please add your solutions to this thread!
Edited Jul 26, 2008 5:23 PM by Travis
You can use this code instead of $findfile to help you find files more easily, and faster...
alias ff {
if (!%ff. [ $+ [ $1- ] ]) || (!$exists(%ff. [ $+ [ $1- ] ])) set %ff. [ $+ [ $1- ] ] $qt($longfn($findfile($nofile($mircexe),$1-,1)))
return %ff. [ $+ [ $1- ] ]
}
To use type in something like...
echo -a $ff(mdx.dll)
[/code]
It will find mdx.dll, and echo its location.
Great work, Travis. 
Edited Jul 29, 2008 6:58 AM by Warrior124
Here is another code you can use...
on *:INPUT:*: {
$eval($replace($1-,$chr(36) $+ mircdir,$nofile($mircexe)),2)
haltdef
}
With this code you can still use $findfile($mircdir,mdx.dll,1) to reveal where mdx.dll in the correct mirc folder.
Edited Jul 30, 2008 12:24 AM by Warrior124
takaharu_
Proof-reading pedantic pain in the proverbial Member #17,633
The alias dir { return $qt($+($nofile($mircexe),$1)) } code doesn't return the AppData folder; it returns c:\program files for those that didn't know.
$mircdir is where the scripts are stored 
Edited Nov 2, 2008 1:03 PM by takaharu_
I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.