mIRC Homepage
Posted By: dustin $fscript, $fscriptline, $falias, and $calias - 23/07/04 04:50 PM
Code:
; script1.mrc
alias one {
  two 
}
...
...
alias two {
  echo -s this alias was called from the alias $falias on line $fscriptline in $fscript
}


two would then echo "this alias was called from the alias one on line 3 in ...\script1.mrc". Get it?

$calias would return the name of the currently executing alias (or maybe $alias with no parameters could be changed to do this).
Don't really see any use for those aliases whatsoever..

surely, if you are going to have alias one call alias two you would know..

$script returns the file currently being executed..

$scriptline returns the currently executed line..

Eamonn.
Posted By: Jae Re: $fscript, $fscriptline, $falias, and $calias - 24/07/04 08:06 PM
How about:
$fsomehting(-1)
$fsomething(0)
$fsomething(1)
etc to work like other alias's and for instance
-1 return the current alias..
0 the total in the call stack
and 1 -> each alias in the call stack..
maybe even allow a the debug command to output into a window various bits on information during the running of a certain event or specific alias. as to track errors.
say:

Code:
 
EVENT: text
$chan: #chan $1- Bleh somehting something
SET %var = 1
WHILE
CMD msg
SET %var = 2
WHILE NEXT
CMD msg
SET %var = 3
WHILE EXIT
CMD echo
ALIAS aliasname{parameters}
   CMD msg
ALIAS END
EVENT END
 


or something to that kind of effect..

Cheers!
© mIRC Discussion Forums