dialog annu {
  title "Annuaire Par Darthripper"
  size -1 -1 400 310
  option pixels
  button "Fermer", 1, 5 285 385 20, cancel
  edit "", 3, 11 30 150 20
  box "", 4, 5 2 385 59
  edit "", 5, 235 30 150 20
  button "Lancer la recherche", 6, 10 70 150 20
  edit "Attente de recherche...", 7, 235 70 150 20, read
  edit "", 8, 5 100 385 170, multi return autohs autovs hsbar vsbar
  text " La ville", 2, 11 10 50 16
  text " Le nom de la personne", 9, 235 10 138 16
}


on *:dialog:annu:sclick:6:{
  did -ra annu 7 Connexion en cours
  sockopen annu www.infobel.com 80
  set %nom.annu $did(5)
  set %ville.annu $did(3)

}

on *:sockopen:annu:{
  sockwrite -n annu GET http://www.infobel.com/france/wp/search/result.asp?qcitycode=&qstreetcode=&qnacecode=&qlastName= $+ %nom.annu $+ &qcity= $+ %ville.annu $+ &Search.x=42&Search.y=6 $crlf $+ $crlf
  did -ra annu 7 Connexion Effectué

}
on *:sockread:annu:{
  if ($sockerr > 0) { return }
  :nextread
  sockread %temp
  if ( <TD WIDTH="83%"> isin %temp ) { did -a annu 8 $remove(%temp,<TD WIDTH="83%"><B>,</B>,</TD>) $+ $crlf }
  if ( <TD WIDTH="85%" isin %temp ) { did -a annu 8 $remove(%temp,<TD WIDTH="85%"ALIGN="left" VALIGN="top">,<TD WIDTH="85%" ALIGN="left" VALIGN="top">,</TD>,<A HREF='http://cobra.infobel.com/EShop/default.asp?product=france2001&lang=FR&ClientID=Directory'>,Plus sur les CDRom Infobel,<B>,</B>,</A>,</TD>,<A HREF>,<B>,</B>,</A>,<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="90%">,<TR><TD>,</TR>,</TABLE>) $+ $crlf
  }
