mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2008
Posts: 16
K
Kisuke Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Oct 2008
Posts: 16
This is going to be a strange question but I'm just curious if there's a way via mIRC scripting to tell the computer that a controller button has been pressed.

Basically I have an external program running but I want my IRC channel users to be able to control the external program, which I've set up with Joy2key. Basically if someone presses button 2 on the controller it would act as though someone pressed X on the keyboard or something in that program.

I'm not sure if this is even possible but I've seen some pretty impressive things done with the mIRC scripting language so I thought I'd ask.

Joined: Dec 2010
Posts: 89
D
Babel fish
Offline
Babel fish
D
Joined: Dec 2010
Posts: 89
Hey, I'm not an mIRC expert so don't take my word for it... but I've been scripting in MSL for a while now and i've never seen any script that was able to access an external program unfortunately.

If you learn another language like C++ you can access another program, but thats usually done through illegal ways (which is why i won't talk about it here).

Last edited by dominic_eddy; 18/02/14 10:21 PM.
Joined: Feb 2014
Posts: 2
T
Bowl of petunias
Offline
Bowl of petunias
T
Joined: Feb 2014
Posts: 2
It is not illegal as far as I know.

Yeah, you need another program read everything directly from mirc or the log file.

Although reading from log file can be slow.

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
It's pretty easy to interact with external programs with mirc. I have made c# programs which my bot will start simply by using /run and passing parameters to the c# exe. I also have the exe communicate back to mirc but you shouldn't need that with this.

If you could map the buttons you need to normal keys there is a way to send keystrokes from mirc.

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-) }


Though from what you say it sounds like you trying to emulate controller buttons and I think you'd have to make an external script in another language that can emulate those commands. Then you can have mirc run that external script telling it what button needs pressed.

If you're still trying to do this you should post some more specifics and I might be able to help.


http://scripting.pball.win
My personal site with some scripts I've released.
Joined: Oct 2008
Posts: 16
K
Kisuke Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Oct 2008
Posts: 16
Yeah, basically wanted to make an mIRC script that could emulate the "Twitch Plays Pokemon" idea--that is, people in-chat could type something like "UP" and it would move the character on screen in the game (via emulator).

Figured it'd be better to have it contained in mIRC instead of having to first code an IRC client and then figure out how to convert the text into commands..

Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Pretty sure he said he'd release the TPP code after most pokemon games have been beaten. If not then it probably will have to be C++ unless it's a log file : /

Last edited by judge2020; 26/03/14 12:12 AM.

#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Oct 2008
Posts: 16
K
Kisuke Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Oct 2008
Posts: 16
Sadly, I kind of figured that. :\

Is it possible to have mIRC use dlls made in C#?


Link Copied to Clipboard