Well, the main reason why people should never hard code their work is because not everyone has the same dlls, and such in the same places that are required in hard coding. This can lead to people not wanting anything else that you work so hard on, and all that work will be for nothing. So, here are some simple things you can do to achieve the same results without having to hard code.
Here is one of the simplest codes you can use to achieve the same results, but works better than hard coding...
alias findfile2 {
if (!%findfile2. [ $+ [ $1- ] ]) || (!$exists(%findfile2. [ $+ [ $1- ] ])) set %findfile2. [ $+ [ $1- ] ] $shortfn($findfile($mircdir,$1-,1))
return %findfile2. [ $+ [ $1- ] ]
}
Now you have a code that works just as well as hard coding, but can find the needed file for your work without having to manually look for it. Once the variable is stored it will work just like hard coding.
Here is an example on how to use it...
alias mdx return $findfile2(mdx.dll) alias dialogmdx return $findfile2(dialog.mdx) on *:dialog:mp3:init: .dll $mdx SetMircVersion $version .dll $mdx MarkDialog $dname .dll $mdx SetControlMDX 10 Positioner size maxbox minbox > $dialogmdx }
This is just a sample code, but it gives you an idea on how to use it. Remember that hard coding works, but only if the right files are in the right place. This code works better. So, I'd better never see another hard coded script again. Just kidding, lol, but please, PLEASE use this code instead. Beleive me when I say you'd do the world a huge favor, lol. ![]()