mIRC Home    About    Download    Register    News    Help

Print Thread
#28403 06/06/03 03:47 AM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
Hi

I have a script that sends a particular line from a news text file, but sometimes the line is blank because the website slightly differs from time to time...

To make the script not send the line if it's blank, would something like this be correct?

if ($cbs == $null) return
else msg etc etc

thanks in advance...


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net
#28404 06/06/03 03:54 AM
Joined: Dec 2002
Posts: 83
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2002
Posts: 83
if $cbs includes all of the lines text, then yet - that would work.

#28405 06/06/03 03:59 AM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
thanks acemiles_ed smile


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net
#28406 06/06/03 05:48 AM
Joined: Dec 2002
Posts: 83
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2002
Posts: 83
Just to clarify:
Code:
if ($cbs == $null) {
/msg $nick etc... etc..
}

#28407 06/06/03 10:51 AM
Joined: Dec 2002
Posts: 94
K
Babel fish
Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
or u could use
Code:
if (!$cbs) { .msg $nick etc... etc... }


Lets get dirty
#28408 06/06/03 01:10 PM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
so would that make it not send a line if it's blank?

here's the whole script...

/cbs {
var %cbs = $remove($read(c:\CitiNews\news\cbs.txt, 33),[10],[11],[12],[13],[14],[15],[16],[17],[18])
if %cbs.last != %cbs {
set %cbs.last %cbs
/msg #NewsRoom 4 $mid(%cbs2,17)
}
}

cheers...


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net
#28409 06/06/03 02:57 PM
Joined: Dec 2002
Posts: 83
A
Babel fish
Offline
Babel fish
A
Joined: Dec 2002
Posts: 83
Code:
/cbs {
var %cbs = $remove($read(c:\CitiNews\news\cbs.txt, 33),[10],[11],[12],[13],[14],[15],[16],[17],[18])
if (%cbs !== $null) {
if %cbs.last != %cbs { 
set %cbs.last %cbs
/msg #NewsRoom 4 $mid(%cbs2,17)
}
}
}

#28410 07/06/03 08:08 AM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
thanks again - seems to be working well now =)


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net
#28411 09/06/03 07:13 AM
Joined: Jan 2003
Posts: 109
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Jan 2003
Posts: 109
actually - it's still returning an empty line to the channel when the line of news is blank. If it helps, the text file has [1] in the blank line between the lines of actual news - any ideas how I can get the script to not say anything to the channel if the line is this blank [1] line?

thanks again... confused


#Newsroom
Where News & Markets Connect
http://www.inewsroom.net

Link Copied to Clipboard