I would like to program my mIRC bot so every time someone writes "W" in the chat, the bot simulates the W key on my keyboard.
I have tried:
on *:text:W:#:sendkeys {W}
alias sendkeys var %a = $ticks
.comopen %a WScript.Shell | if !$comerr {
.comclose %a $com(%a,SendKeys,3,bstr,$1-)
}
This doesn't seem to be working. Any advice?
The code is fine, the blocks in which you execute that code are incorrect. Due to a lack of brackets, your alias will only execute the var command, and be done after that.
Taken from the mIRC help files:
The { } brackets: You can create multi-line scripts by using the { } brackets. This allows you to create an alias which performs several commands.
alias sendkeys {
var %a = $ticks
.comopen %a WScript.Shell
if !$comerr {
.comclose %a $com(%a,SendKeys,3,bstr,$1-)
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With