mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Can you elaborate on what isn't working, and how you want it to work?

-genius_at_work

Joined: Jul 2006
Posts: 248
B
bwuser Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jul 2006
Posts: 248
actually i made the error of putting the code in alias instead of remote.
yes dumb mistake smile
so i only would like to change location of the .txt in that script
to $scriptdir \TVCheck\

thanks

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You know... if you want it to match anywhere in the line of text, or with/without various words (e.g. "the"), then you're really getting complicated.

Trying to make a script that will handle all combinations of filenames that people send of the various show episodes is an effort in futility because no matter how many exceptions you throw into the script, it's not an intelligent script. It will never be able to notice everything that you notice. Ok, so you decide to ignore "The" in the filename. What about when someone doesn't have "A" in the title? Ok, so you add that in there. What if people format it with - instead of .? Ok, you add that in. What if people put something else in front of the name?

Do you see where I am going with this? I suppose you could eventually find 99% of the possible ways the filenames will be formatted, but it will take quite awhile to find them all. Also, by the time you get them all working, it will probably have to search through the file/hash table/whatever so many times that it will be a waste of CPU to do so.

People ask for MP3 sorters all the time (same basic idea you want). It just isn't possible to make something that will catch all possibilities when you are getting filenames from different people because they will all format them differently.

Perhaps the best suggestion I'd give you would be to try and set up a multi-level system to check each "word" to.

file.txt
--
The
-The.Daily.Show
-The.Daily
-The.Colbert.Report
-The.Colbert

Colbert
-Colbert.Report

Daily
-Daily.Show
--

With this sort of structure, you could do a search for Daily. It would tell you that Daily.Show was a match, so you could see if .Show follows Daily. If so, it's a match. If not, it's not and you go on to the next.

If it started with The, then it would first check The.Daily.Show, if that's not a match, it would check The.Daily, if that's not a match, then it would continue down. If nothing matches, it would move on to the second part of the text (second token in $1).

This really is a very intensive process, but it may be the closest you'll get to 100% accuracy as it wouldn't hang up on missing words or extra words, as long as no words are inserted in the middle of the title.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Quote:
ex
----- us.talkshow.txt -----
Conan.O.Brien
David.Letterman
Jay.Leno
Jimmy.Kimmel.Live
The.Colbert.Report
The.Daily.Show
----- us.talkshow.txt -----
David.Letterman.45.Special.Guest.Here-YES MATCH
David NO MATCH
The.Daily.Show.2006.23.12-TEST MATCH
Daily.Show.2006.23.12-TEST NO MATCH
Blah.The.Daily Show == NO MATCH
The.Daily.Show.Blah == MATCH

There all correct, as per your direction, or at least as i understoodf what you said.

The text said in channel must be matched at the start of the text by a line in the file, beyond that there was no divinitive position.

Blah.The.Daily Show cant be matched becuase blah isnt on the front of any lines in the file
The.Daily.Show.Blah this is matched by line #6 in the file


Quote:
also i'd like us.talkshow.txt to be located in mircdir\TVCheck\

replace
$+($scriptdir,us.talkshow.txt)
with
$+($mircdir,TVCheck\us.talkshow.txt)

Page 2 of 2 1 2

Link Copied to Clipboard