mIRC E.R.K Scripting Tool

By gooshie on Aug 13, 2009

This Echo Random Kolor Scripting Tool is a scripting aide.

When testing snippets or trying to figure out the proper
identifier and parameters it is often useful to use the
echo command instead of msg/describe etc etc..
Example: //echo $me is scripting mIRC $version

When the first item after the //echo command is an $identifier
and it evaluates to a number the echo command sees it as a color
code. Also if nothing follows this number mIRC displays an error
as in: * /echo: insufficient parameters
Example: //echo $scon(0)

This /erk command was written to address this and also perform
the following task:

  • Begins line with :erk: to remind you it is /erk
  • Evaluates the the line without the need to type //erk
    when used from the command line.
  • Encloses (-e) the line in line separators to help it standout
  • Uses a random color to aid in telling when you triggered the
    same line for the zillionth time.

NOTE: This is NOT intended to be left in a script for distribution.
These colors work with the author's settings. Edit it for your use.

Image

; gooshie's Echo Random Kolor Scripting Tool (/erk)
; Three versions same results

erk echo $replace($r(5,9),5,3,6,4) -e :erk: [ [ $1- ] ]

erk {
  var %k | goto $r(1,5)
  :1 | %k = 3 | goto x
  :2 | %k = 4 | goto x
  :3 | %k = 7 | goto x
  :4 | %k = 8 | goto x
  :5 | %k = 9 | :x
  echo %k -e :erk: [ [ $1- ] ]
}

erk {
  var %k $r(1,5)
  if (%k = 1) %k = 3
  elseif (%k = 2) %k = 4
  elseif (%k = 3) %k = 7
  elseif (%k = 4) %k = 8
  else %k = 9
  echo %k -e :erk: [ [ $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.