mIRC Home    About    Download    Register    News    Help

Print Thread
#37250 19/07/03 10:37 PM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
getting a list of all the directories within a selected directory and have it output to a txt file?

#37251 19/07/03 10:50 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
/help $finddir
/help /write

#37252 19/07/03 11:06 PM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
thanks, I got that much down now. two questions though...

Update New {
//echo 1 $finddir(c:\New,*.*,0,write new.txt $1-)

}

that's the script. for some reason, I get a number echo'd in my active window when it's done. why is that? how can I stop it?

second, how can I strip the directory part from being written? ie, so instead of writing...

c:\new\this is a sample folder\

it would just write "this is a sample folder"?

I looked up "$strip" but that seems to just pertain to bold/underline/etc...

#37253 19/07/03 11:15 PM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
nevermind, got it, thanks.

#37254 19/07/03 11:21 PM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
.Announce new {
set %newest $read(c:\new\new.txt) $chr(124) $read(c:\new\new.txt) $chr(124) $read(c:\new\new.txt) $chr(124) $read(c:\new\new.txt) $chr(124) $read(c:\new\new.txt)
echo -a NEW: %newest
}

I'm having another small kink. How can I make sure it doesn't select the same folder twice?

#37255 19/07/03 11:24 PM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
/help if-then-else



"watch the news today, so you don't have to watch the history channel tomorrow."
#37256 19/07/03 11:28 PM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
how can I use an if-then-else in there? don't they have to be part of an "on" script?

#37257 19/07/03 11:34 PM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
not to mention, I don't really see how I could do that...

I mean, there are five different ones. am I supposed to compare each one to each previous one? there's got to be an easier way to do it than that

last simple question, now. if I have a script open a DCC chat, how can I message the DCC chat, and not the person's nick?

#37258 20/07/03 12:20 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
how can I strip the directory part from being written?

$nopath($1-) gives the file with no path.
$nofile($1-) gives the path with no file.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#37259 20/07/03 12:39 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
mazer, i think youa re asking the wrong question, you asked "how can i make it so it doesnt chose the same floder twice" when the question you wanted to ask is how would i make sure $read doesnt grab the same random like twice or more for the duration of the alias correct?


"watch the news today, so you don't have to watch the history channel tomorrow."
#37260 20/07/03 05:45 AM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
yeah, that's the question. and the answer is?

#37261 20/07/03 07:07 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
like this i suppose

Code:
 
.Announce new {
set %newest $read(c:\new\new.txt, 1) $chr(124) $read(c:\new\new.txt, 2) $chr(124) $read(c:\new\new.txt, 3) $chr(124) $read(c:\new\new.txt, 4) $chr(124) $read(c:\new\new.txt, 5)
echo -a NEW: %newest
}


 



that will read line 1 line two line three line for and line five in order mate...


"watch the news today, so you don't have to watch the history channel tomorrow."
#37262 20/07/03 07:10 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
and no... if-then-else statments are for when you need to check a condition against another condition to preform certain things


"watch the news today, so you don't have to watch the history channel tomorrow."
#37263 20/07/03 08:21 PM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
I'd prefer for them to be random, and not just "this line, then this line, etc" if it's possible.

any idea on my dcc chat question?

thanks for your help

#37264 20/07/03 09:19 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
As for the DCC chat, use /msg =nick message.

#37265 21/07/03 05:49 AM
Joined: Jan 2003
Posts: 66
M
maezr Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Jan 2003
Posts: 66
what happens if you use that before the connection is established?


Link Copied to Clipboard