mIRC Home    About    Download    Register    News    Help

Print Thread
#251748 02/03/15 08:45 AM
Joined: Mar 2015
Posts: 3
N
Noisy Offline OP
Self-satisified door
OP Offline
Self-satisified door
N
Joined: Mar 2015
Posts: 3
Hey there, (this is a Twitch problem)

i know there are topics already about it and i searched for them aswell, but it loks like they are not working for me or anymore. My Situation is, i have a Bot (Seperated from my own PC) and i want if a user writes for example !overlay 1
that my bot sends a message to my irc (which is running on my pc) and when my irc gets this message, it pushs the Button.
I tested several codes i found but it looks like they are not working

Code:
on *:text:f1:#:sendkeys {F1}

alias sendkeys var %a = $ticks | .comopen %a WScript.Shell | if !$comerr { .comclose %a $com(%a,SendKeys,3,bstr,$1-) }


also i tried it with this
Code:
alias sendkeys {
  var %a = sendkeys $+ $ticks
  .comopen %a WScript.Shell
  if !$comerr {
    var %b = $com(%a,SendKeys,3,bstr,$1-)
    .comclose %a
    return %b
  }
  return 0
}

+
Code:
msg $chan //sendkeys {f1}


with the second option it writes this in the chat but when i write it manually it pushs the button f1.

can anyone help me out here?

edit: by pressing the key it would switch the overlay, since i have hotkeys set on OBS

Last edited by Noisy; 02/03/15 08:46 AM.
Noisy #251749 02/03/15 08:59 AM
Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
This works for me

Code:
alias sendkey {
 set -l %name sendkeys $+ $ticks
 .comopen %name WScript.Shell
 .comclose %name $com(%name,SendKeys,3,bstr,$1-)
}

Sakana #251750 02/03/15 09:06 AM
Joined: Mar 2015
Posts: 3
N
Noisy Offline OP
Self-satisified door
OP Offline
Self-satisified door
N
Joined: Mar 2015
Posts: 3
and then with this?

Code:
on *:text:f1:#:sendkeys {F1}


and is it sendkey or sendkeyS with s

Last edited by Noisy; 02/03/15 09:07 AM.
Noisy #251751 02/03/15 09:15 AM
Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
on *:text:f1:#:sendkey {F1}

Sakana #251752 02/03/15 09:34 AM
Joined: Mar 2015
Posts: 3
N
Noisy Offline OP
Self-satisified door
OP Offline
Self-satisified door
N
Joined: Mar 2015
Posts: 3
working tyvm !


Link Copied to Clipboard