mIRC Homepage
Posted By: krunch sockets - 16/07/03 12:14 PM
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
Posted By: Hammer Re: sockets - 16/07/03 04:32 PM
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
Posted By: codemastr Re: sockets - 16/07/03 05:59 PM
With all the coloring you use in your posts I must say... you have too much free time on your hands :P
Posted By: KingTomato Re: sockets - 16/07/03 07:27 PM
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
Posted By: Hammer Re: sockets - 17/07/03 02:13 AM
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
Posted By: Online Re: sockets - 17/07/03 02:54 AM
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.
Posted By: Watchdog Re: sockets - 17/07/03 03:56 AM
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
Posted By: Watchdog Re: sockets - 17/07/03 04:02 AM
Error: cannot find user cookie.

All I get is this. Is there a way to kick this in the guts?
Posted By: KingTomato Re: sockets - 17/07/03 04:37 AM
top line, change the C:\Windows\Cookies to your (im guessing) C:\Documents And Settings\%user%\... blah directory >:D
Posted By: Watchdog Re: sockets - 17/07/03 06:11 AM
Taa.
Posted By: qwerty Re: sockets - 17/07/03 10:55 AM
...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?).
Posted By: Hammer Re: sockets - 17/07/03 11:13 AM
* Hammer blushes furiously
© mIRC Discussion Forums