mIRC Home    About    Download    Register    News    Help

Print Thread
#34886 08/07/03 02:25 AM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
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 }


We don't just write the scripts, we put them to the test! (ScriptBusters)
#34887 08/07/03 02:33 AM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
alias _test { echo -a $_test2 }
alias _test2 { return ok }

Otherwise use:

alias _test { _test2 }
alias _test2 { echo -a ok }


- Jason
#34888 08/07/03 02:39 AM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
umm but some things I dont want echo'ed, sometimes they might be echo'ed and sometimes things might /say'ed


We don't just write the scripts, we put them to the test! (ScriptBusters)
#34889 08/07/03 05:52 AM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
//say $_test2



- Jason
#34890 08/07/03 06:22 AM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
... 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.


We don't just write the scripts, we put them to the test! (ScriptBusters)
#34891 08/07/03 08:19 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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)


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#34892 08/07/03 01:21 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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.


#34893 08/07/03 03:07 PM
Joined: Feb 2003
Posts: 143
N
naki Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Feb 2003
Posts: 143
ok well I am asking for it to not be impossible and be added to a future version of mIRC.


We don't just write the scripts, we put them to the test! (ScriptBusters)
#34894 08/07/03 03:28 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
i explained u why it can't

#34895 08/07/03 07:31 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#34896 08/07/03 11:23 PM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
he didn't mean that.. you can see his script in scripts&popups forum and there what he is trying to do is impossible


#34897 13/07/03 02:51 AM
Joined: Jul 2003
Posts: 14
R
Pikka bird
Offline
Pikka bird
R
Joined: Jul 2003
Posts: 14
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 }

#34898 13/07/03 03:02 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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.

#34899 13/07/03 04:19 AM
Joined: Jul 2003
Posts: 11
Z
Pikka bird
Offline
Pikka bird
Z
Joined: Jul 2003
Posts: 11
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

#34900 13/07/03 05:23 AM
Joined: May 2003
Posts: 730
S
Hoopy frood
Offline
Hoopy frood
S
Joined: May 2003
Posts: 730
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


Link Copied to Clipboard