loading files or dlls

By Silo on Dec 12, 2009

This alias was not written by me, but I use it every day. It was written by Warrior124 and he has given me permission in the past to share this alias.

What it is does is, by wrapping the needed file name within a custom identifier, makes it so the file will always load regardless of where in the script it is.

Place this in the alias section of your scripts editor (Alt A).

Usage:

dll $mdx SetControlMDX $dname 5,6,10 toolbar nodivider flat arrows > $ff(bars.mdx)
dll $mdx SetControlMDX $dname 4 ToolBar list wrap nodivider > $ff(bars.mdx)
did -i $dname 6 1 setimage icon small $ff(tick.ico)

/*
The ff alias was written by Warrior124, this should be used as a universal alias, in my humble opinion.
It calls on any dll, icon etc regardless of it's path or whereabouts.
if you use this alias and this alias alone in your own scripts you intend to distribute, please, give Warrior124
the due credit he deserves
*/
ff {
  if (!%ff. [ $+ [ $1- ] ]) || (!$exists(%ff. [ $+ [ $1- ] ])) {
    if (!$longfn($findfile($nofile($mircexe),$1-,1))) set %ff. [ $+ [ $1- ] ] $nofile($mircexe) $+ $1-
    else set %ff. [ $+ [ $1- ] ] $shortfn($findfile($nofile($mircexe),$1-,1))
  }
  return %ff. [ $+ [ $1- ] ]
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.