mIRC Homepage
Posted By: FireBrick on input: send a command - 31/12/02 06:41 PM
I wish a typed string to then call an existing remote.

sort of
on 1:INPUT:#:<word1>: /set <%word2 1>

so if I type 'word1' the remote will then perform the task which 'word2' requests.

The /set %word2 1 remote works correctly.

I'm missing something obvious here frown

Posted By: Dana Re: on input: send a command - 31/12/02 06:57 PM
I don't really understand your question.

Is the variable %word2 composed of a command? And you want the script to execute the command whenever you type in "word1"?

If so, try:

On *:INPUT:#: if (word1 == $1-) { %word2 }

I suspect that's not necessarily what you want though .. so please clarify. smile
Posted By: FireBrick Re: on input: send a command - 31/12/02 08:39 PM
The word1 is a constant.
Always the same word.

If i type that word into the message line, I want that word to be the cause for sent the command /set %word2 1

I don't want word1 to be sent to the channel.
it's like it's a password that when it's types causes an event to be performed automatically.
Posted By: Hammer Re: on input: send a command - 31/12/02 10:01 PM
Not sure I understand what you want, either .. but here's my guess:
Code:

on *:INPUT:#:pass:{
  set $+(%,$2) $3-
  halt
}
Posted By: FireBrick Re: on input: send a command - 31/12/02 10:32 PM
I'm making this too hard on you guys.
Let me try to exlain it this way.

I already have a working script that is called alpha.
When I type /set %alpha 1
The script performs it's job.

I want to make it easier/quicker for me to type
So ...
I need the codet that interprets 'alpha' as being the same as if I had typed /set %alpha 1

basically I want the single word 'alpha' to be shorthand for /set %alqha 1
and of course it as to run.

I'm really sorry to take up your time I'm just starting to learn the scripting lanquage.
Posted By: Dana Re: on input: send a command - 31/12/02 11:31 PM
Sounds to me like you want an alias.
Code:
alias alpha { set %alpha 1 }

Or if you just want to enter the command anywhere and not have it display..
Code:
On *:INPUT:#: if ($1- == alpha) { set %alpha 1 | halt }
© mIRC Discussion Forums