mIRC Home    About    Download    Register    News    Help

Print Thread
#230699 18/03/11 03:54 PM
Joined: Dec 2008
Posts: 1,515
westor Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Hello,

I wanna suggest a way to get the name of the calling alias.

e.g:

now the mirc working with this:

Code:
alias here_i_have_a_big_alias_that_i_cannot_remeber_it_when_scripting {
  var %a = here_i_have_a_big_alias_that_i_cannot_remeber.....
  if (!$1) { echo -a %a $+ : error 1 | halt }
  if (!$2) { echo -a %a $+ : error 2 | halt }
  if (!$3) { echo -a %a $+ : error 3 | halt }
}


i wonder if mirc can add this alias to help me more with the code without any vars or anything else
Code:
alias here_i_have_a_big_alias_that_i_cannot_remeber_it_when_scripting {
  if (!$1) { echo -a $calias $+ : error 1 | halt }
  if (!$2) { echo -a $calias $+ : error 2 | halt }
  if (!$3) { echo -a $calias $+ : error 3 | halt }
}


- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
westor #230704 18/03/11 04:19 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I don't know why you need a really long alias name, but I do agree that some kind of identifier to tell you what alias you are in could be useful.

For now, if your aliases are on the remotes tab, you can mostly use $read with $script and $scriptline and read up until you find the first word being alias. Not very efficient, but that will give you the alias name as long as you aren't using "alias" as the first word anywhere other than when declaring the aliases.

I can see how this can be useful for custom error messages (or a custom error message alias).


Invision Support
#Invision on irc.irchighway.net
westor #230716 18/03/11 07:29 PM
Joined: Jul 2006
Posts: 4,153
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,153
This has been requested many time in the past, it would still be useful.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Wims #230818 21/03/11 12:35 PM
Joined: Sep 2006
Posts: 59
R
Babel fish
Offline
Babel fish
R
Joined: Sep 2006
Posts: 59
I would also like to see this implemented if possible


Link Copied to Clipboard