geronimo
Premium Member
ciao Joe ,volevo chiederti come mai da qualche tempo il tuo script per aggiornare le estrazioni del lotto non mi funziona più ?


ne uso un altro per aggiornare ma è lunghissimo da copiare, mentre il tuo è bellissimo e corto ...
'Agg_Lotto V.4.2 By Joe *** Archivio LottoPython *** - 06/01/2026 -
'Script per Spaziometria By Joe.
Dim sFileLoc
Dim nEstrTot,sDataLastEstr,k,r
Dim sDataEstr,nNumEstr,nSalvate
Dim b
Dim sFileBd
Dim sLink
Dim Ia,N,sVV,x
Dim CfrData
Dim Vecchio,Nuovo
Dim V
Dim E
Dim S: S = String(4," ")
sLink = "https://raw.githubusercontent.com/Lottopython/exstrazionales/refs/heads/main/Estrazionales lotto.txt"
b = False : N = False
nSalvate = 0
sFileBd = GetDirectoryAppData & "BaseDati.dat"
Scrivi sFileBd,1,,,2 : Scrivi
sFileLoc = GetDirectoryAppData & "ArcTlv\"
Messaggio "Agg_Lotto V.4.2 By Joe *** Archivio LottoPython ***"
If CreaDirectory(sFileLoc) Then
sFileLoc = sFileLoc & "Archivio.txt"
If DownloadFromWeb(sLink,sFileLoc) Then
nEstrTot = EstrazioniArchivio
sDataLastEstr = DataEstrazione(nEstrTot,,,"/")
Vecchio = Right(sDataLastEstr,4)
Ia = IndiceAnnuale(nEstrTot)
ReDim aRighe(0)
Call LeggiRigheFileDiTesto(sFileLoc,aRighe)
For k = 0 To UBound(aRighe) Step 12
AvanzamentoElab 1,UBound(aRighe),k
ReDim aV(0)
If Len(aRighe(k)) = 53 Then
sDataEstr = Left(aRighe(k),2) & "/" & Mid(aRighe(k),4,2) & "/" & Mid(aRighe(k),7,4)
ReDim aEstr(11,5)
For r = 0 To 10
sVV = Right(aRighe(k + r),27)
V = Split(sVV,S) 'Spazio
For x = 0 To 4
aEstr(r + 1,x + 1) = V(x)
Next
Next
Nuovo = Right(sDataEstr,4)
If b Then
If Nuovo <> Vecchio Then Ia = 0 : Vecchio = Nuovo
If sDataEstr <> sDataLastEstr Then
Ia = Ia + 1
nNumEstr = Ia
If nNumEstr > 0 And IsDate(sDataEstr) Then
If CfrData <> sDataEstr Then
If SalvaEstrazione(aEstr,sDataEstr,nNumEstr,sFileBd) Then
CfrData = sDataEstr
nSalvate = nSalvate + 1
End If
Else
ColoreTesto 2
Scrivi "ATTENZIONE " & sDataEstr & " ERRORE NELLE DATE",True
ColoreTesto 0
End If
End If
End If
End If
If sDataEstr = sDataLastEstr Then b = True
Else
Scrivi "Errore nel Download"
End If
Next
If nSalvate > 0 Then AllineaArchivi
Else
Scrivi "Errore nella creazione Dei File Necessari"
End If
Call Scrivi("Aggiornamento Lotto V.4.2 By Joe *** Utilizza Archivio lottoPython ***",1)
Call Scrivi("")
Call Scrivi("Estrazioni trovate in Archivio Remoto " & QuantitaEstrazioniInFile(sFileBd))
Call Scrivi("")
Call Scrivi("Archivio Locale Aggiornato all' Estrazione N° " & IndiceAnnuale(EstrazioniArchivio) & " del " & DataEstrazione(EstrazioneFin,,,"/"))
Call Scrivi("")
Call Scrivi("- Sono state Aggiunte " & nSalvate & " Estrazioni -",1,,,1)
Call Scrivi("")
End If
SI è PER CASO PERSO QUALCHE BITE ? NEL PROMPT DI SPAZIO GIRA MA ALLA FINE DA NESSUNA ESTRAZIONE AGGIUNTA
GRAZIE E BUONA GIORNATA


ne uso un altro per aggiornare ma è lunghissimo da copiare, mentre il tuo è bellissimo e corto ...
'Agg_Lotto V.4.2 By Joe *** Archivio LottoPython *** - 06/01/2026 -
'Script per Spaziometria By Joe.
Dim sFileLoc
Dim nEstrTot,sDataLastEstr,k,r
Dim sDataEstr,nNumEstr,nSalvate
Dim b
Dim sFileBd
Dim sLink
Dim Ia,N,sVV,x
Dim CfrData
Dim Vecchio,Nuovo
Dim V
Dim E
Dim S: S = String(4," ")
sLink = "https://raw.githubusercontent.com/Lottopython/exstrazionales/refs/heads/main/Estrazionales lotto.txt"
b = False : N = False
nSalvate = 0
sFileBd = GetDirectoryAppData & "BaseDati.dat"
Scrivi sFileBd,1,,,2 : Scrivi
sFileLoc = GetDirectoryAppData & "ArcTlv\"
Messaggio "Agg_Lotto V.4.2 By Joe *** Archivio LottoPython ***"
If CreaDirectory(sFileLoc) Then
sFileLoc = sFileLoc & "Archivio.txt"
If DownloadFromWeb(sLink,sFileLoc) Then
nEstrTot = EstrazioniArchivio
sDataLastEstr = DataEstrazione(nEstrTot,,,"/")
Vecchio = Right(sDataLastEstr,4)
Ia = IndiceAnnuale(nEstrTot)
ReDim aRighe(0)
Call LeggiRigheFileDiTesto(sFileLoc,aRighe)
For k = 0 To UBound(aRighe) Step 12
AvanzamentoElab 1,UBound(aRighe),k
ReDim aV(0)
If Len(aRighe(k)) = 53 Then
sDataEstr = Left(aRighe(k),2) & "/" & Mid(aRighe(k),4,2) & "/" & Mid(aRighe(k),7,4)
ReDim aEstr(11,5)
For r = 0 To 10
sVV = Right(aRighe(k + r),27)
V = Split(sVV,S) 'Spazio
For x = 0 To 4
aEstr(r + 1,x + 1) = V(x)
Next
Next
Nuovo = Right(sDataEstr,4)
If b Then
If Nuovo <> Vecchio Then Ia = 0 : Vecchio = Nuovo
If sDataEstr <> sDataLastEstr Then
Ia = Ia + 1
nNumEstr = Ia
If nNumEstr > 0 And IsDate(sDataEstr) Then
If CfrData <> sDataEstr Then
If SalvaEstrazione(aEstr,sDataEstr,nNumEstr,sFileBd) Then
CfrData = sDataEstr
nSalvate = nSalvate + 1
End If
Else
ColoreTesto 2
Scrivi "ATTENZIONE " & sDataEstr & " ERRORE NELLE DATE",True
ColoreTesto 0
End If
End If
End If
End If
If sDataEstr = sDataLastEstr Then b = True
Else
Scrivi "Errore nel Download"
End If
Next
If nSalvate > 0 Then AllineaArchivi
Else
Scrivi "Errore nella creazione Dei File Necessari"
End If
Call Scrivi("Aggiornamento Lotto V.4.2 By Joe *** Utilizza Archivio lottoPython ***",1)
Call Scrivi("")
Call Scrivi("Estrazioni trovate in Archivio Remoto " & QuantitaEstrazioniInFile(sFileBd))
Call Scrivi("")
Call Scrivi("Archivio Locale Aggiornato all' Estrazione N° " & IndiceAnnuale(EstrazioniArchivio) & " del " & DataEstrazione(EstrazioneFin,,,"/"))
Call Scrivi("")
Call Scrivi("- Sono state Aggiunte " & nSalvate & " Estrazioni -",1,,,1)
Call Scrivi("")
End If
SI è PER CASO PERSO QUALCHE BITE ? NEL PROMPT DI SPAZIO GIRA MA ALLA FINE DA NESSUNA ESTRAZIONE AGGIUNTA
GRAZIE E BUONA GIORNATA
