mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2004
Posts: 4
D
dustin Offline OP
Self-satisified door
OP Offline
Self-satisified door
D
Joined: Mar 2004
Posts: 4
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).

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
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.

Joined: Feb 2004
Posts: 201
J
Jae Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Feb 2004
Posts: 201
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!


Link Copied to Clipboard