mIRC Home    About    Download    Register    News    Help

Print Thread
#36652 16/07/03 12:14 PM
Joined: Dec 2002
Posts: 94
K
krunch Offline OP
Babel fish
OP Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
okay
Code:
alias weather {
  sockclose weather
  echo connecting to www.wunderground.com 80
  sockopen wz www.wunderground.com 80
}

on *:SOCKOPEN:weather: { 
  echo -s $sockname was just opened, Retrieving info
  sockwrite -n $sockname GET  /cgi-bin/findweather/getForecast?query=christchurch+new+zealand HTTP/1.0 
  sockwrite $sockname $crlf 
}
on *:SOCKCLOSE:weather: {
  echo Connect to wunderground.com closed
  sockclose weather
}
on 1:sockread:weather:{
  if ($sockerr > 0) return
  :next
  sockread %tmp
  if ($sockbr == 0) return
  if (%tmp != $null) {
    echo -s %tmp
  }
  goto next
}


thats the root of the code, not too smart
does anyone know a easy way to filter the info I want?
ie: the Conditions
and only the updated time and place
temp, wind and conditions
I hate using big if statments and plus it seems to over write vars that are set becasue the if statment meats another one
any help would be good

btw the code that it gets over written i deleted pissed me off
but its just if (updated: isin %tmp) { } etc


Lets get dirty
#36653 16/07/03 04:32 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Pulling from the posts I have made on the subject:Or you can do your own search using the forum's Search feature.
  1. Search
  2. Forum or category search: All forums
  3. Words to search for: :SOCKREAD:
  4. Search options: Entire phrase
  5. Date range: All posts
  6. Number of results to show per page:25 (or however many you want at a time)
  7. Click the Submit button.
Happy scripting. cool


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#36654 16/07/03 05:59 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
With all the coloring you use in your posts I must say... you have too much free time on your hands :P

#36655 16/07/03 07:27 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
you know, i say the same thing. Especialy with all the green comments he seems to be able to pull out of the script. >:D

And I was just thinking, a good project for mirc would be a dialog that querys this web board, but not the regular forums--but the Search page. >:D That was from the luxury of mirc, u get searc results on the topic your looking for >:D


-KingTomato
#36656 17/07/03 02:13 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
codemastr:

You don't like my coloring different text to set it off from what surrounds it? Yes, I spend a lot of time adding in the color codes (etc.) to make it visually make more sense (to me, at least). I think it makes comments show as comments more visually and makes commands/event headers/whatever stand out better inside a paragraph so you know you're supposed to type something or see something as code or as a reply from the server. I try to keep my formatting as close to default mIRC's as I can, within reason.
:tongue:

KingTomato:

That would not be all that unrealistic. You would have to script in cookie support to deal with the session info, and with method=post to send the variables, but both are doable. Good luck. laugh


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#36657 17/07/03 02:54 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
Speaking of a script for this forum, I once made a quick script that connects the main page and tells you the amount of unread posts.

#36658 17/07/03 03:56 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I like the colour coding you use, I should follow that example and would only that I am usually too lazy to ;comment - but there is hope for me yet and I might start soon. Don't worry about codemastr, he's stuck with that *eeww* Logitech meese. laugh

#36659 17/07/03 04:02 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Error: cannot find user cookie.

All I get is this. Is there a way to kick this in the guts?

#36660 17/07/03 04:37 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
top line, change the C:\Windows\Cookies to your (im guessing) C:\Documents And Settings\%user%\... blah directory >:D


-KingTomato
#36661 17/07/03 06:11 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Taa.

#36662 17/07/03 10:55 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
...and he uses this time to make posts of the highest quality on these boards (both visually and in content), while others spend this time to just annoy us with their thousand-per-minute posting rate (remember the "hide post count" discussion?).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#36663 17/07/03 11:13 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
* Hammer blushes furiously


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard