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!!


~~~

I'm a Scripting Newbie, please forgive my questions, and have patience with me. Thanks!
#43219 20/08/03 02:34 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
use: $sdir(c:\program files, select a txt file) smirk


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#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?


~~~

I'm a Scripting Newbie, please forgive my questions, and have patience with me. Thanks!
#43221 20/08/03 02:43 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Code:
playfile:.play # $sfile($mircdirtest,Select the file of your choice,Grab me!) 1000


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#43222 20/08/03 02:44 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
#sdir? that brings up the directory selection dialog, not the file selection...


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#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'



~~~

I'm a Scripting Newbie, please forgive my questions, and have patience with me. Thanks!
#43224 20/08/03 03:00 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
playfile:.play # $+(",$sfile($mircdirtest,Select the file of your choice,Grab me!),") 1000

Last edited by pheonix; 20/08/03 03:02 PM.

new username: tidy_trax
#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?


~~~

I'm a Scripting Newbie, please forgive my questions, and have patience with me. Thanks!
#43226 20/08/03 03:18 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
playfile:.play # $+(",$sfile($mircdir,Select the file of your choice,Grab me!),") 1000


new username: tidy_trax
#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!!


~~~

I'm a Scripting Newbie, please forgive my questions, and have patience with me. Thanks!
#43228 20/08/03 03:25 PM
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
np grin


new username: tidy_trax

Link Copied to Clipboard