mIRC Home    About    Download    Register    News    Help

Print Thread
#43218 20/08/03 02:23 PM
Joined: Aug 2003
Posts: 27
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2003
Posts: 27
I am trying to write a popup that will display a box to select a text file to play from my text directory in mirc, then play the file i select in the channel. I've tried searching for how to write this, but the suggestions other have given did seem to work.

I tried it 3 different way from 3 different suggestions on websites...none of them played my file. Here are the three different popup lines I've tried:

PlayTXT:/play $$file="Choose a Txt" text\*.txt

Text:/play # $dir="select a txt file" $mircdir $+ *.txt 1000

Commands:/play -c # $dir="select a txt file" $mircdir $+ *.txt 1000

Could someone please show me how to create a popup that will open my C:\program files\mirc\text directory, let me select one of the text files there, and then play it in the channel with a 1 second delay?

Thank you!!

#43219 20/08/03 02:34 PM
Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
use: $sdir(c:\program files, select a txt file) smirk

#43220 20/08/03 02:43 PM
Joined: Aug 2003
Posts: 27
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2003
Posts: 27
Sparta, well.....now I have:

Text:/play # $sdir=(c:\program files\mirc\text) $+ *.txt 1000

And I'm feeling more confused that I was before. All this seems to do is let me select a directory...but I can't get to the files in the directory.

What have I done wrong?

#43221 20/08/03 02:43 PM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
Code:
playfile:.play # $sfile($mircdirtest,Select the file of your choice,Grab me!) 1000

#43222 20/08/03 02:44 PM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
#sdir? that brings up the directory selection dialog, not the file selection...

#43223 20/08/03 02:53 PM
Joined: Aug 2003
Posts: 27
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2003
Posts: 27
locutus - i tried out the code you wrote, and while I can now select a file, when I click "grab it" it won't play. Is there an option in mirc that i might have forgotten to check that is keeping me from playing the text file?

I get this message when I try to play them:

* /play: unable to open 'C:\Program'


#43224 20/08/03 03:00 PM
Joined: May 2003
Posts: 2,250
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,250
playfile:.play # $+(",$sfile($mircdirtest,Select the file of your choice,Grab me!),") 1000

Last edited by pheonix; 20/08/03 03:02 PM.
#43225 20/08/03 03:07 PM
Joined: Aug 2003
Posts: 27
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2003
Posts: 27
*sigh* I tried the code you gave me pheonix, and I am still getting the same message as when I tried playing with locutus' code:

* /play: unable to open 'C:\Program'

If it helps any, the exact location of my text fils for mirc is:
C:\Program Files\mIRC\text

I don't understand why these won't play. Is there maybe an option for being able to play files that I have forgotten to select?

#43226 20/08/03 03:18 PM
Joined: May 2003
Posts: 2,250
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,250
playfile:.play # $+(",$sfile($mircdir,Select the file of your choice,Grab me!),") 1000

#43227 20/08/03 03:23 PM
Joined: Aug 2003
Posts: 27
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Aug 2003
Posts: 27
YIPEEE!!!!!

Thank you so much pheonix!!! It works!!!

Much appreciation, bells and whistles for your help!!! I'll even throw in some cake and fireworks!! Hehehehe

Thank you!!

#43228 20/08/03 03:25 PM
Joined: May 2003
Posts: 2,250
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,250
np grin


Link Copied to Clipboard