mIRC Home    About    Download    Register    News    Help

Topic Options
#244316 - 15/02/14 02:52 AM A Way to Push Controller Buttons
Kisuke Offline
Pikka bird

Registered: 19/10/08
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.

Top
#244354 - 18/02/14 10:18 PM Re: A Way to Push Controller Buttons [Re: Kisuke]
dominic_eddy Offline
Babel fish

Registered: 26/12/10
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).


Edited by dominic_eddy (18/02/14 10:21 PM)

Top
#244385 - 22/02/14 11:38 PM Re: A Way to Push Controller Buttons [Re: dominic_eddy]
Topsu Offline
Bowl of petunias

Registered: 22/02/14
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.

Top
#244393 - 23/02/14 03:12 PM Re: A Way to Push Controller Buttons [Re: Topsu]
pball Offline
Fjord artisan

Registered: 04/11/09
Posts: 294
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.x10.mx/
My personal site with some scripts I've released.

Top
#244744 - 24/03/14 07:26 PM Re: A Way to Push Controller Buttons [Re: pball]
Kisuke Offline
Pikka bird

Registered: 19/10/08
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..

Top
#244749 - 26/03/14 12:12 AM Re: A Way to Push Controller Buttons [Re: Kisuke]
judge2020 Offline
Fjord artisan

Registered: 21/03/14
Posts: 215
Loc: USA
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 : /


Edited by judge2020 (26/03/14 12:12 AM)
_________________________
#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball

Top
#244769 - 27/03/14 05:14 PM Re: A Way to Push Controller Buttons [Re: judge2020]
Kisuke Offline
Pikka bird

Registered: 19/10/08
Posts: 16
Sadly, I kind of figured that. :\

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

Top