0

I'm currently making a twitch bot, I've got mIRC setup and the bot is in the chat, and I've tested some commands and everything seemed fine. I don't know any mIRC, but I do know python well, so I was wondering if I could make mIRC execute a python script and give it the data from the command in the chat, and then on python process the data and send the answer back to mIRC to post it onto the chat? I was able to execute a python script on my computer that just printed "Your bot is working" through the chat with:

 on *:TEXT:!python:#: { run C:\Users\Zenithsiz\Desktop\Test.py [arguments]}

But I don't know how through python I would pass the data, which is just a string to post in the chat and I can't find any way to do it.

Filipe Rodrigues
  • 1,843
  • 2
  • 12
  • 21
  • Quick google on "windows run python script with arguments" I found this: http://stackoverflow.com/questions/17544307/how-do-i-run-python-script-using-arguments-in-windows-command-line. There are also some problems with registery or something, you should look into that but I hope that SO post will help you further. – Denny Jul 30 '16 at 00:04
  • That post does helps with getting the data from mIRC to python, but then I have another problem which is to get the data that has been processed in python to mIRC in order for mIRC to post in chat. – Filipe Rodrigues Jul 31 '16 at 01:14

1 Answers1

0

If you can set the output of the python to a temporary text file you can set a secondary fetch command to read the file entry and return it to the room. It's a thought I mean it works for 20 questions and other scripts.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 13 '22 at 05:10