j'ai eu un petit soucis avec JAPBE 3.6.10.566 !!
si on désactive "Activer les Hotspots pour les url"
le code ci dessous ne marche pas !!
par contre si on active cette option , meme si l'option attenante
"Toujours visible" est décoché le code marche tres bien
c'est peut etre normal , mais ça méritais d'etre signalé
ce code se connecte sur la française des jeux et recupere les numero de l'euromillion (ça va me servir pour updater mon prg "Euro million")
les chiffres sont inscrit en bas de page du gadget editeur !!

si l'option est coché , on a des caracteres incoherent qui s'affichent
Sorry : Web Translation
I had small a concern with JAPBE 3.6.10.56 6!! if one decontaminates “To activate Hotspots for the URL” code Ci below does not go!!

on the other hand if one activates this option, same if the contiguous option “Always visible” the code is stripped goes very well it east can be normal, but that deserved to be announced: D this code is connected on the Frenchwoman of the plays and recovers the number of the euromillion (that will be useful to me for updater my prg “Euro million”) the figures are registered at the foot of the page of the gadget editor!! : D if the option is notched, there are characters incoherent which are posted : D
;/ Author : Pille
; Proxy like this : "192.168.0.1:8080"
Global Site.s=
"http://www.fdjeux.com/jeux/euromillions ... tirage.php"
;Global Site.s="http://michel.dobro.free.fr/index.htm"
ProcedureDLL.s Url2Text2(Url.s, OpenType.b,ProxyAndPort.s)
; 1 INTERNET_OPEN_TYPE_DIRECT Resolves all host names locally.
; 0 INTERNET_OPEN_TYPE_PRECONFIG Retrieves the proxy Or direct configuration from the registry.
; 4 INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY Retrieves the proxy Or direct configuration from the registry And prevents the use of a startup Microsoft JScript Or Internet Setup (INS) file.
; 3 INTERNET_OPEN_TYPE_PROXY Passes requests To the proxy unless a proxy bypass list is supplied And the name To be resolved bypasses the proxy. In this Case, the function uses INTERNET_OPEN_TYPE_DIRECT.
isLoop.b=1
INET_RELOAD.l = $80000000
hInet.l=0
hURL.l=0
Bytes.l=0
Buffer.s=
Space (2048 )
RES.s=
""
hInet =
InternetOpen_ (
"" , OpenType, ProxyAndPort,
"" , 0)
hURL =
InternetOpenUrl_ (hInet, Url,
#Null , 0, INET_RELOAD, 0)
Repeat
InternetReadFile_ (hURL,@Buffer,
Len (Buffer), @Bytes)
If Bytes = 0
isLoop=0
Else
RES = RES +
Left (Buffer, Bytes)
EndIf
Until isLoop=0
InternetCloseHandle_ (hURL)
InternetCloseHandle_ (hInet)
ProcedureReturn RES
EndProcedure
ProcedureDLL.s Url2Text(Url.s)
ProcedureReturn Url2Text2(Url,1,
"" )
EndProcedure
Procedure.s recup_loto()
; toute la page web est dans "Url2Text(#Site)"
Position =
FindString (Url2Text(Site.s),
"<DIV CLASS=" +
Chr ($22)+
"numero" ,1)
; on va filtrer les ligne de text
ligne$=
Mid (Url2Text(Site.s),Position,220)
; pour trouver nos chiffres
For i= 1
To Len (ligne$)
car$=
Mid (ligne$,i,1)
If Asc (car$)>48
And Asc (car$)<57
; si on tombe sur des chiffres
car2$=car2$+car$
; on garde
Else
car2$=car2$+
"" ; sinon on ecrit rien
EndIf
If car$=
"<"
car2$=car2$+
","
EndIf
Next i
; ***** petite bidouilles pour virer les virgules en trop ***********
car2$=
ReplaceString ( car2$,
",," ,
"," )
car2$=
Right (car2$,
Len (car2$)-1)
car2$=
ReplaceString ( car2$,
",," ,
"" )
; ****************************************************
ProcedureReturn car2$
EndProcedure
;/ Test
MessageRequester (Site.s,Url2Text(Site.s))
OpenWindow (0,10,10,800,600,
"resultat" ,
#PB_Window_SystemMenu )
CreateGadgetList (
WindowID (0))
EditorGadget (2, 10, 10, 800,580)
AddGadgetItem (2, -1, Url2Text(Site.s))
AddGadgetItem (2, -1,
"les chiffres de l'euro million : " +recup_loto())
Repeat
event=
WindowEvent ()
Until event =
#PB_Event_CloseWindow