Public feed #890497

Untitled

public text v1 · immutable
Raw Edit
·published 2008-02-03 19:57 UTC
rendered paste body
alias Google { 
  dialog -m Google Google 
} 
menu * { 
  Google:/dialog -m Google Google 
} 
dialog google {
  title "Google - Search"
  size -1 -1 358 491
  option pixels
  tab "Search", 1, -1 -1 602 516
  tab "Images", 4
  button "Lookup", 5, 46 214 260 25, tab 1 flat
  edit "Search Google", 6, 65 179 228 20, tab 1 autohs autovs
  list 7, 47 294 260 154, tab 1 hsbar vsbar size
  edit "", 8, 47 269 260 20, tab 1 autohs autovs
  box "", 9, 34 151 284 319, tab 1
  edit "Image Search", 3, 30 160 172 20, tab 4
  button "Search", 10, 238 160 81 25, tab 4 flat
  box "", 11, 12 145 328 52, tab 4
}
on *:DIALOG:Google:sclick:5:{ 
  dialog -t $dname Google - $did(6)
  set %item $did(6)
  sockopen Google www.google.com 80  
} 
on *:SOCKOPEN:Google:{ 
  sockwrite -nt $sockname get www.google.com
  sockwrite -nt $sockname Host: /search?hl=en&q= $+ %item $+ &btnI=I%27m+Feeling+Lucky HTTP/1.1
  sockwrite -nt $sockname $crlf
} 
on *:SOCKREAD:google: {
  if (!$sockerr) {
    var %lol
    sockread %lol
    if (*location* iswm %lol) {
      did -a google 7 $remove(%lol,Location:)
    }
    elseif (*did not* iswm %lol) {
      did -a google 7 COULDNT FIND IT LOL!!!!!!!
    }
  }
}
on *:SOCKCLOSE:google: {
  unset %item
}