mIRC Home    About    Download    Register    News    Help

Print Thread
Open file on text #248075 19/09/14 02:31 PM
Joined: Sep 2014
Posts: 259
S
Sakana Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Hi, I'm running a trivia bot for twitch streaming, and I would like it to automatically open picture files on certain questions. How can this be accomplished?

Any help is greatly appreciated

Re: Open file on text [Re: Sakana] #248076 19/09/14 03:09 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
You could use the /run command.
/run path\image.png

It's not beautiful, but I'd expect it to be some long code if you wanna manipulate the windows viewer somehow


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Open file on text [Re: Nillen] #248079 19/09/14 05:50 PM
Joined: Sep 2014
Posts: 259
S
Sakana Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Thanks, it works great now! There's just one last thing I can't figure out:

How do you get a bot to trigger on its own text? This appears to not work. I suppose I could have yet another client open to fix that, but that seems like an extremely clunky solution :P

Last edited by Sakana; 19/09/14 05:52 PM.
Re: Open file on text [Re: Sakana] #248080 19/09/14 06:03 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
on input


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Open file on text [Re: Nillen] #248082 19/09/14 09:03 PM
Joined: Sep 2014
Posts: 259
S
Sakana Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
First I tried the crude method of using 2 clients, and just repeating this for every question:

on *:text:Trivia question:#: if ($nick = BotName ) { /run C:\Image.jpg }

It works fine when I type in the question manually, but nothing happens when the bot is running and asks the same question (Tat's trivia script). Why is this? frown

I also don't see how the above code can be transformed into ON INPUT.

Re: Open file on text [Re: Sakana] #248083 19/09/14 09:28 PM
Joined: Jan 2004
Posts: 1,314
L
Loki12583 Online
Hoopy frood
Online
Hoopy frood
L
Joined: Jan 2004
Posts: 1,314
You need to edit the trivia script.