|
Joined: Aug 2003
Posts: 27
Ameglian cow
|
OP
Ameglian cow
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!
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
use: $sdir(c:\program files, select a txt file)
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2003
Posts: 27
Ameglian cow
|
OP
Ameglian cow
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!
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,271 |
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
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Aug 2003
Posts: 27
Ameglian cow
|
OP
Ameglian cow
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!
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Aug 2003
Posts: 27
Ameglian cow
|
OP
Ameglian cow
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!
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
playfile:.play # $+(",$sfile($mircdir,Select the file of your choice,Grab me!),") 1000
new username: tidy_trax
|
|
|
|
Joined: Aug 2003
Posts: 27
Ameglian cow
|
OP
Ameglian cow
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!
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
np
new username: tidy_trax
|
|
|
|
|