Je suis en train de créer un programme avec Purebaic 4.51 pour télécharger des urls. Je n'arrive pas à télécharger plus de 3 fichiers à la fois sinon le programme plante.
D'après les essais que j'ai fait il faut jouer sur:
Code : Tout sélectionner
hInetCon=InternetConnect_(hnet1,domain,80,#Null,#Null,3,0,0)
Code : Tout sélectionner
hInetCon=InternetConnect_(hnet1,domain,80,#Null,#Null,4,0,0)
Code : Tout sélectionner
Procedure OpenConnexion(Url.s,Connexion,Position)
Select Connexion;{
Case 1;{
hnet1=InternetOpen_("",1,#Null,#Null,0)
hURL1=InternetOpenUrl_(hnet1,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet1,domain,80,#Null,#Null,3,0,0);}
Case 2;{
hnet2=InternetOpen_("",1,#Null,#Null,0)
hURL2=InternetOpenUrl_(hnet2,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet2,domain,80,#Null,#Null,3,0,0);}
Case 3;{
hnet3=InternetOpen_("",1,#Null,#Null,0)
hURL3=InternetOpenUrl_(hnet3,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet3,domain,80,#Null,#Null,3,0,0);}
Case 4;{
hnet4=InternetOpen_("",2,#Null,#Null,0)
hURL4=InternetOpenUrl_(hnet4,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet4,domain,80,#Null,#Null,3,0,0);}
Case 5;{
hnet5=InternetOpen_("",1,#Null,#Null,0)
hURL5=InternetOpenUrl_(hnet5,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet5,domain,80,#Null,#Null,3,0,0);}
Case 6;{
hnet6=InternetOpen_("",1,#Null,#Null,0)
hURL6=InternetOpenUrl_(hnet6,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet6,domain,80,#Null,#Null,3,0,0);}
Case 7;{
hnet7=InternetOpen_("",1,#Null,#Null,0)
hURL7=InternetOpenUrl_(hnet7,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet7,domain,80,#Null,#Null,3,0,0);}
Case 8;{
hnet8=InternetOpen_("",1,#Null,#Null,0)
hURL8=InternetOpenUrl_(hnet8,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet8,domain,80,#Null,#Null,3,0,0);}
Case 9;{
hnet9=InternetOpen_("",1,#Null,#Null,0)
hURL9=InternetOpenUrl_(hnet9,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet9,domain,80,#Null,#Null,3,0,0);}
Case 10;{
hnet10=InternetOpen_("",1,#Null,#Null,0)
hURL10=InternetOpenUrl_(hnet10,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet10,domain,80,#Null,#Null,3,0,0);}
Case 11;{
hnet11=InternetOpen_("",1,#Null,#Null,0)
hURL11=InternetOpenUrl_(hnet11,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet11,domain,80,#Null,#Null,3,0,0);}
Case 12;{
hnet12=InternetOpen_("",1,#Null,#Null,0)
hURL12=InternetOpenUrl_(hnet12,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet12,domain,80,#Null,#Null,3,0,0);}
Case 13;{
hnet13=InternetOpen_("",1,#Null,#Null,0)
hURL13=InternetOpenUrl_(hnet13,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet13,domain,80,#Null,#Null,3,0,0);}
Case 14;{
hnet14=InternetOpen_("",1,#Null,#Null,0)
hURL14=InternetOpenUrl_(hnet14,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet14,domain,80,#Null,#Null,3,0,0);}
Case 15;{
hnet15=InternetOpen_("",1,#Null,#Null,0)
hURL15=InternetOpenUrl_(hnet15,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet15,domain,80,#Null,#Null,3,0,0);}
Case 16;{
hnet16=InternetOpen_("",1,#Null,#Null,0)
hURL16=InternetOpenUrl_(hnet16,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet16,domain,80,#Null,#Null,3,0,0);}
Case 17;{
hnet17=InternetOpen_("",1,#Null,#Null,0)
hURL17=InternetOpenUrl_(hnet17,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet17,domain,80,#Null,#Null,3,0,0);}
Case 18;{
hnet18=InternetOpen_("",1,#Null,#Null,0)
hURL18=InternetOpenUrl_(hnet18,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet18,domain,80,#Null,#Null,3,0,0);}
Case 19;{
hnet19=InternetOpen_("",1,#Null,#Null,0)
hURL19=InternetOpenUrl_(hnet19,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet19,domain,80,#Null,#Null,3,0,0);}
Case 20;{
hnet20=InternetOpen_("",1,#Null,#Null,0)
hURL20=InternetOpenUrl_(hnet20,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet20,domain,80,#Null,#Null,3,0,0);}
Case 21;{
hnet21=InternetOpen_("",1,#Null,#Null,0)
hURL21=InternetOpenUrl_(hnet21,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet21,domain,80,#Null,#Null,3,0,0);}
Case 22;{
hnet22=InternetOpen_("",1,#Null,#Null,0)
hURL22=InternetOpenUrl_(hnet22,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet22,domain,80,#Null,#Null,3,0,0);}
Case 23;{
hnet23=InternetOpen_("",1,#Null,#Null,0)
hURL23=InternetOpenUrl_(hnet23,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet23,domain,80,#Null,#Null,3,0,0);}
Case 24;{
hnet24=InternetOpen_("",1,#Null,#Null,0)
hURL24=InternetOpenUrl_(hnet24,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet24,domain,80,#Null,#Null,3,0,0);}
Case 25;{
hnet25=InternetOpen_("",1,#Null,#Null,0)
hURL25=InternetOpenUrl_(hnet25,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet25,domain,80,#Null,#Null,3,0,0);}
Case 26;{
hnet26=InternetOpen_("",1,#Null,#Null,0)
hURL26=InternetOpenUrl_(hnet26,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet26,domain,80,#Null,#Null,3,0,0);}
Case 27;{
hnet27=InternetOpen_("",1,#Null,#Null,0)
hURL27=InternetOpenUrl_(hnet27,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet27,domain,80,#Null,#Null,3,0,0);}
Case 28;{
hnet28=InternetOpen_("",1,#Null,#Null,0)
hURL28=InternetOpenUrl_(hnet28,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet28,domain,80,#Null,#Null,3,0,0);}
Case 29;{
hnet29=InternetOpen_("",1,#Null,#Null,0)
hURL29=InternetOpenUrl_(hnet29,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet29,domain,80,#Null,#Null,3,0,0);}
Case 30;{
hnet30=InternetOpen_("",1,#Null,#Null,0)
hURL30=InternetOpenUrl_(hnet30,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet30,domain,80,#Null,#Null,3,0,0);}
Case 31;{
hnet31=InternetOpen_("",1,#Null,#Null,0)
hURL31=InternetOpenUrl_(hnet31,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet31,domain,80,#Null,#Null,3,0,0);}
Case 32;{
hnet32=InternetOpen_("",1,#Null,#Null,0)
hURL32=InternetOpenUrl_(hnet32,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet32,domain,80,#Null,#Null,3,0,0);}
Case 33;{
hnet33=InternetOpen_("",1,#Null,#Null,0)
hURL33=InternetOpenUrl_(hnet33,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet33,domain,80,#Null,#Null,3,0,0);}
Case 34;{
hnet34=InternetOpen_("",1,#Null,#Null,0)
hURL34=InternetOpenUrl_(hnet34,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet34,domain,80,#Null,#Null,3,0,0);}
Case 35;{
hnet35=InternetOpen_("",1,#Null,#Null,0)
hURL35=InternetOpenUrl_(hnet35,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet35,domain,80,#Null,#Null,3,0,0);}
Case 36;{
hnet36=InternetOpen_("",1,#Null,#Null,0)
hURL36=InternetOpenUrl_(hnet36,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet36,domain,80,#Null,#Null,3,0,0);}
Case 37;{
hnet37=InternetOpen_("",1,#Null,#Null,0)
hURL37=InternetOpenUrl_(hnet37,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet37,domain,80,#Null,#Null,3,0,0);}
Case 38;{
hnet38=InternetOpen_("",1,#Null,#Null,0)
hURL38=InternetOpenUrl_(hnet38,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet38,domain,80,#Null,#Null,3,0,0);}
Case 39;{
hnet39=InternetOpen_("",1,#Null,#Null,0)
hURL39=InternetOpenUrl_(hnet39,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet39,domain,80,#Null,#Null,3,0,0);}
Case 40;{
hnet40=InternetOpen_("",1,#Null,#Null,0)
hURL40=InternetOpenUrl_(hnet40,Url,#Null,0,$80000000,0)
domain.s=ReplaceString(Left(Url,(FindString(Url,"/",8) - 1)),"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@","")
hInetCon=InternetConnect_(hnet40,domain,80,#Null,#Null,3,0,0);}
EndSelect;}
If hInetCon>0;{
a.s=ReplaceString(Url,"http://"+GetURLPart(Url,#PB_URL_User)+":"+GetURLPart(Url,#PB_URL_Password)+"@"+domain+"/","")
HttpOpenRequest=HttpOpenRequest_(hInetCon,"HEAD",a,"http/1.1",#Null,0,$80000000,0)
If HttpOpenRequest>0
iretval=HttpSendRequest_(HttpOpenRequest,#Null,0,0,0)
If iretval>0
tmp.s=GetQueryInfo(HttpOpenRequest,19)
If Trim(tmp)="200"
tmp=GetQueryInfo(HttpOpenRequest,22)
If FindString(tmp,"Content-Length:",1)>0
ii.l=FindString(tmp,"Content-Length:",1)+Len("Content-Length:")
tmp=Mid(tmp,ii,Len(tmp)-ii)
Select Connexion
Case 1;{
TF1=Val(Trim(tmp))
HideGadget(#ProgressBar1,0):HideGadget(#NomVideo1,0)
SetGadgetAttribute(#ProgressBar1,#PB_ProgressBar_Maximum,TF1)
Mo.s=StrD(TF1/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo1,GetGadgetText(#NomVideo1)+" - "+Mo);}
Case 2;{
TF2=Val(Trim(tmp))
HideGadget(#ProgressBar2,0):HideGadget(#NomVideo2,0)
SetGadgetAttribute(#ProgressBar2,#PB_ProgressBar_Maximum,TF2)
Mo.s=StrD(TF2/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo2,GetGadgetText(#NomVideo2)+" - "+Mo);}
Case 3;{
TF3=Val(Trim(tmp))
HideGadget(#ProgressBar3,0):HideGadget(#NomVideo3,0)
SetGadgetAttribute(#ProgressBar3,#PB_ProgressBar_Maximum,TF3)
Mo.s=StrD(TF3/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo3,GetGadgetText(#NomVideo3)+" - "+Mo);}
Case 4;{
TF4=Val(Trim(tmp))
HideGadget(#ProgressBar4,0):HideGadget(#NomVideo4,0)
SetGadgetAttribute(#ProgressBar4,#PB_ProgressBar_Maximum,TF4)
Mo.s=StrD(TF4/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo4,GetGadgetText(#NomVideo4)+" - "+Mo);}
Case 5;{
TF5=Val(Trim(tmp))
HideGadget(#ProgressBar5,0):HideGadget(#NomVideo5,0)
SetGadgetAttribute(#ProgressBar5,#PB_ProgressBar_Maximum,TF5)
Mo.s=StrD(TF5/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo5,GetGadgetText(#NomVideo5)+" - "+Mo);}
Case 6;{
TF6=Val(Trim(tmp))
HideGadget(#ProgressBar6,0):HideGadget(#NomVideo6,0)
SetGadgetAttribute(#ProgressBar6,#PB_ProgressBar_Maximum,TF6)
Mo.s=StrD(TF6/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo6,GetGadgetText(#NomVideo6)+" - "+Mo);}
Case 7;{
TF7=Val(Trim(tmp))
HideGadget(#ProgressBar7,0):HideGadget(#NomVideo7,0)
SetGadgetAttribute(#ProgressBar7,#PB_ProgressBar_Maximum,TF7)
Mo.s=StrD(TF7/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo7,GetGadgetText(#NomVideo7)+" - "+Mo);}
Case 8;{
TF8=Val(Trim(tmp))
HideGadget(#ProgressBar8,0):HideGadget(#NomVideo8,0)
SetGadgetAttribute(#ProgressBar8,#PB_ProgressBar_Maximum,TF8)
Mo.s=StrD(TF8/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo8,GetGadgetText(#NomVideo8)+" - "+Mo);}
Case 9;{
TF9=Val(Trim(tmp))
HideGadget(#ProgressBar9,0):HideGadget(#NomVideo9,0)
SetGadgetAttribute(#ProgressBar9,#PB_ProgressBar_Maximum,TF9)
Mo.s=StrD(TF9/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo9,GetGadgetText(#NomVideo9)+" - "+Mo);}
Case 10;{
TF10=Val(Trim(tmp))
HideGadget(#ProgressBar10,0):HideGadget(#NomVideo10,0)
SetGadgetAttribute(#ProgressBar10,#PB_ProgressBar_Maximum,TF10)
Mo.s=StrD(TF10/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo10,GetGadgetText(#NomVideo10)+" - "+Mo);}
Case 11;{
TF11=Val(Trim(tmp))
HideGadget(#ProgressBar11,0):HideGadget(#NomVideo11,0)
SetGadgetAttribute(#ProgressBar11,#PB_ProgressBar_Maximum,TF11)
Mo.s=StrD(TF11/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo11,GetGadgetText(#NomVideo11)+" - "+Mo);}
Case 12;{
TF12=Val(Trim(tmp))
HideGadget(#ProgressBar12,0):HideGadget(#NomVideo12,0)
SetGadgetAttribute(#ProgressBar12,#PB_ProgressBar_Maximum,TF12)
Mo.s=StrD(TF12/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo12,GetGadgetText(#NomVideo12)+" - "+Mo);}
Case 13;{
TF13=Val(Trim(tmp))
HideGadget(#ProgressBar13,0):HideGadget(#NomVideo13,0)
SetGadgetAttribute(#ProgressBar13,#PB_ProgressBar_Maximum,TF13)
Mo.s=StrD(TF13/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo13,GetGadgetText(#NomVideo13)+" - "+Mo);}
Case 14;{
TF14=Val(Trim(tmp))
HideGadget(#ProgressBar14,0):HideGadget(#NomVideo14,0)
SetGadgetAttribute(#ProgressBar14,#PB_ProgressBar_Maximum,TF14)
Mo.s=StrD(TF14/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo14,GetGadgetText(#NomVideo14)+" - "+Mo);}
Case 15;{
TF15=Val(Trim(tmp))
HideGadget(#ProgressBar15,0):HideGadget(#NomVideo15,0)
SetGadgetAttribute(#ProgressBar15,#PB_ProgressBar_Maximum,TF15)
Mo.s=StrD(TF15/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo15,GetGadgetText(#NomVideo15)+" - "+Mo);}
Case 16;{
TF16=Val(Trim(tmp))
HideGadget(#ProgressBar16,0):HideGadget(#NomVideo16,0)
SetGadgetAttribute(#ProgressBar16,#PB_ProgressBar_Maximum,TF16)
Mo.s=StrD(TF16/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo16,GetGadgetText(#NomVideo16)+" - "+Mo);}
Case 17;{
TF17=Val(Trim(tmp))
HideGadget(#ProgressBar17,0):HideGadget(#NomVideo17,0)
SetGadgetAttribute(#ProgressBar17,#PB_ProgressBar_Maximum,TF17)
Mo.s=StrD(TF17/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo17,GetGadgetText(#NomVideo17)+" - "+Mo);}
Case 18;{
TF18=Val(Trim(tmp))
HideGadget(#ProgressBar18,0):HideGadget(#NomVideo18,0)
SetGadgetAttribute(#ProgressBar18,#PB_ProgressBar_Maximum,TF18)
Mo.s=StrD(TF18/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo18,GetGadgetText(#NomVideo18)+" - "+Mo);}
Case 19;{
TF19=Val(Trim(tmp))
HideGadget(#ProgressBar19,0):HideGadget(#NomVideo19,0)
SetGadgetAttribute(#ProgressBar19,#PB_ProgressBar_Maximum,TF19)
Mo.s=StrD(TF19/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo19,GetGadgetText(#NomVideo19)+" - "+Mo);}
Case 20;{
TF20=Val(Trim(tmp))
HideGadget(#ProgressBar20,0):HideGadget(#NomVideo20,0)
SetGadgetAttribute(#ProgressBar20,#PB_ProgressBar_Maximum,TF20)
Mo.s=StrD(TF20/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo20,GetGadgetText(#NomVideo20)+" - "+Mo);}
Case 21;{
TF21=Val(Trim(tmp))
HideGadget(#ProgressBar21,0):HideGadget(#NomVideo21,0)
SetGadgetAttribute(#ProgressBar21,#PB_ProgressBar_Maximum,TF21)
Mo.s=StrD(TF21/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo21,GetGadgetText(#NomVideo21)+" - "+Mo);}
Case 22;{
TF22=Val(Trim(tmp))
HideGadget(#ProgressBar22,0):HideGadget(#NomVideo22,0)
SetGadgetAttribute(#ProgressBar22,#PB_ProgressBar_Maximum,TF22)
Mo.s=StrD(TF22/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo22,GetGadgetText(#NomVideo22)+" - "+Mo);}
Case 23;{
TF23=Val(Trim(tmp))
HideGadget(#ProgressBar23,0):HideGadget(#NomVideo23,0)
SetGadgetAttribute(#ProgressBar23,#PB_ProgressBar_Maximum,TF23)
Mo.s=StrD(TF23/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo23,GetGadgetText(#NomVideo23)+" - "+Mo);}
Case 24;{
TF24=Val(Trim(tmp))
HideGadget(#ProgressBar24,0):HideGadget(#NomVideo24,0)
SetGadgetAttribute(#ProgressBar24,#PB_ProgressBar_Maximum,TF24)
Mo.s=StrD(TF24/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo24,GetGadgetText(#NomVideo24)+" - "+Mo);}
Case 25;{
TF25=Val(Trim(tmp))
HideGadget(#ProgressBar25,0):HideGadget(#NomVideo25,0)
SetGadgetAttribute(#ProgressBar25,#PB_ProgressBar_Maximum,TF25)
Mo.s=StrD(TF25/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo25,GetGadgetText(#NomVideo25)+" - "+Mo);}
Case 26;{
TF26=Val(Trim(tmp))
HideGadget(#ProgressBar26,0):HideGadget(#NomVideo26,0)
SetGadgetAttribute(#ProgressBar26,#PB_ProgressBar_Maximum,TF26)
Mo.s=StrD(TF26/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo26,GetGadgetText(#NomVideo26)+" - "+Mo);}
Case 27;{
TF27=Val(Trim(tmp))
HideGadget(#ProgressBar27,0):HideGadget(#NomVideo27,0)
SetGadgetAttribute(#ProgressBar27,#PB_ProgressBar_Maximum,TF27)
Mo.s=StrD(TF27/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo27,GetGadgetText(#NomVideo27)+" - "+Mo);}
Case 28;{
TF28=Val(Trim(tmp))
HideGadget(#ProgressBar28,0):HideGadget(#NomVideo28,0)
SetGadgetAttribute(#ProgressBar28,#PB_ProgressBar_Maximum,TF28)
Mo.s=StrD(TF28/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo28,GetGadgetText(#NomVideo28)+" - "+Mo);}
Case 29;{
TF29=Val(Trim(tmp))
HideGadget(#ProgressBar29,0):HideGadget(#NomVideo29,0)
SetGadgetAttribute(#ProgressBar29,#PB_ProgressBar_Maximum,TF29)
Mo.s=StrD(TF29/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo29,GetGadgetText(#NomVideo29)+" - "+Mo);}
Case 30;{
TF30=Val(Trim(tmp))
HideGadget(#ProgressBar30,0):HideGadget(#NomVideo30,0)
SetGadgetAttribute(#ProgressBar30,#PB_ProgressBar_Maximum,TF30)
Mo.s=StrD(TF30/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo30,GetGadgetText(#NomVideo30)+" - "+Mo);}
Case 31;{
TF31=Val(Trim(tmp))
HideGadget(#ProgressBar31,0):HideGadget(#NomVideo31,0)
SetGadgetAttribute(#ProgressBar31,#PB_ProgressBar_Maximum,TF31)
Mo.s=StrD(TF31/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo31,GetGadgetText(#NomVideo31)+" - "+Mo);}
Case 32;{
TF32=Val(Trim(tmp))
HideGadget(#ProgressBar32,0):HideGadget(#NomVideo32,0)
SetGadgetAttribute(#ProgressBar32,#PB_ProgressBar_Maximum,TF32)
Mo.s=StrD(TF32/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo32,GetGadgetText(#NomVideo32)+" - "+Mo);}
Case 33;{
TF33=Val(Trim(tmp))
HideGadget(#ProgressBar33,0):HideGadget(#NomVideo33,0)
SetGadgetAttribute(#ProgressBar33,#PB_ProgressBar_Maximum,TF33)
Mo.s=StrD(TF33/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo33,GetGadgetText(#NomVideo33)+" - "+Mo);}
Case 34;{
TF34=Val(Trim(tmp))
HideGadget(#ProgressBar34,0):HideGadget(#NomVideo34,0)
SetGadgetAttribute(#ProgressBar34,#PB_ProgressBar_Maximum,TF34)
Mo.s=StrD(TF34/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo34,GetGadgetText(#NomVideo34)+" - "+Mo);}
Case 35;{
TF35=Val(Trim(tmp))
HideGadget(#ProgressBar35,0):HideGadget(#NomVideo35,0)
SetGadgetAttribute(#ProgressBar35,#PB_ProgressBar_Maximum,TF35)
Mo.s=StrD(TF35/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo35,GetGadgetText(#NomVideo35)+" - "+Mo);}
Case 36;{
TF36=Val(Trim(tmp))
HideGadget(#ProgressBar36,0):HideGadget(#NomVideo36,0)
SetGadgetAttribute(#ProgressBar36,#PB_ProgressBar_Maximum,TF36)
Mo.s=StrD(TF36/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo36,GetGadgetText(#NomVideo36)+" - "+Mo);}
Case 37;{
TF37=Val(Trim(tmp))
HideGadget(#ProgressBar37,0):HideGadget(#NomVideo37,0)
SetGadgetAttribute(#ProgressBar37,#PB_ProgressBar_Maximum,TF37)
Mo.s=StrD(TF37/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo37,GetGadgetText(#NomVideo37)+" - "+Mo);}
Case 38;{
TF38=Val(Trim(tmp))
HideGadget(#ProgressBar38,0):HideGadget(#NomVideo38,0)
SetGadgetAttribute(#ProgressBar38,#PB_ProgressBar_Maximum,TF38)
Mo.s=StrD(TF38/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo38,GetGadgetText(#NomVideo38)+" - "+Mo);}
Case 39;{
TF39=Val(Trim(tmp))
HideGadget(#ProgressBar39,0):HideGadget(#NomVideo39,0)
SetGadgetAttribute(#ProgressBar39,#PB_ProgressBar_Maximum,TF39)
Mo.s=StrD(TF39/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo39,GetGadgetText(#NomVideo39)+" - "+Mo);}
Case 40;{
TF40=Val(Trim(tmp))
HideGadget(#ProgressBar40,0):HideGadget(#NomVideo40,0)
SetGadgetAttribute(#ProgressBar40,#PB_ProgressBar_Maximum,TF40)
Mo.s=StrD(TF40/1024/1024,2)+" Mo"
SetGadgetText(#NomVideo40,GetGadgetText(#NomVideo40)+" - "+Mo);}
EndSelect
EndIf
EndIf
EndIf
EndIf
EndIf;}
SetGadgetItemColor(#Liste1,Position,#PB_Gadget_FrontColor,$0007FF,5)
EndProcedure