mIRC Homepage
Posted By: naki return out of alias. - 08/07/03 02:25 AM
I didnt know if this was a bug or not. If it is not is it possible that this could be added to a future release of mIRC.

alias _test { _test2 }
alias _test2 { return ok }
Posted By: lammkott Re: return out of alias. - 08/07/03 02:33 AM
alias _test { echo -a $_test2 }
alias _test2 { return ok }

Otherwise use:

alias _test { _test2 }
alias _test2 { echo -a ok }
Posted By: naki Re: return out of alias. - 08/07/03 02:39 AM
umm but some things I dont want echo'ed, sometimes they might be echo'ed and sometimes things might /say'ed
Posted By: lammkott Re: return out of alias. - 08/07/03 05:52 AM
//say $_test2

Posted By: naki Re: return out of alias. - 08/07/03 06:22 AM
... that's not the point.

I am working on a script that does a whois and then sets a varibable with the whois information... Then it takes the idle time and returns the value... But it doesnt return because mIRC doesnt work like that. And all of it is in like 3 different aliases. I also dont want to echo it because I might use it for scripting purposes.
Posted By: qwerty Re: return out of alias. - 08/07/03 08:19 AM
What's wrong with
Code:
alias _test { return $_test2 }
alias _test2 { return ok }


Whenever you use $_test, you would actually use the return value of $_test2 ("ok" here)
Posted By: ScatMan Re: return out of alias. - 08/07/03 01:21 PM
i know what u are trying to do, that's impossible, cuz first of all, in your whois code the /return doesn't know that it's belong to your $identifier, it's other event and /return returns the value only to your alias from the same alias. also, $identifier won't wait to a response from the server or something it will just do the commands in the alias and return only what u /return 'ed from the alias.

Posted By: naki Re: return out of alias. - 08/07/03 03:07 PM
ok well I am asking for it to not be impossible and be added to a future version of mIRC.
Posted By: ScatMan Re: return out of alias. - 08/07/03 03:28 PM
i explained u why it can't
Posted By: Raccoon Re: return out of alias. - 08/07/03 07:31 PM
Hehe, looks like everyone forgot about $result.

alias _test2 { return ok }
alias _test { _test2 | echo 4 -a $result }

ok

$result contains information from the last /return, even if the alias that /returned wasn't called as an $identifier.

- Raccoon
Posted By: ScatMan Re: return out of alias. - 08/07/03 11:23 PM
he didn't mean that.. you can see his script in scripts&popups forum and there what he is trying to do is impossible

Posted By: reets Re: return out of alias. - 13/07/03 02:51 AM
i couldn't find the script but what is naki trying to do?? just return the value like such?

alias test { echo $test2 }
alias test2 { return j00r m0m }
Posted By: ScatMan Re: return out of alias. - 13/07/03 03:02 AM
he is trying to make an IDENTIFIER that will RETURN someone's idle, it will /whois the user and /return the idle to the identifier. impossible.
Posted By: ZeroCarontE Re: return out of alias. - 13/07/03 04:19 AM
it could be possible...
if your mirc freezes and only unfreeze when the response of the whois comes
or
if just the script "freezes" (halts) until the response comes...

the last is better, but i dont know exactly if this is possible
Posted By: ScatMan Re: return out of alias. - 13/07/03 05:23 AM
haha, what if the response will never come?? it could happen if something is wrong with the server and there will be lot of bugs in the mirc cause of that, it is just impossible
© mIRC Discussion Forums