Novità

Aiuto per verifica

matt68

Super member
Sub Main

Const BA_ = 1
Const CA_ = 2
Const FI_ = 3
Const GE_ = 4
Const MI_ = 5
Const NA_ = 6
Const PA_ = 7
Const RM_ = 8
Const TO_ = 9
Const VE_ = 10
Const NZ_ = 11
Const TT_ = 12

Dim FIn,Es,Es2,Ini,N1,N2,N3,N4,N5,N6,Retnum,Retvinc
Dim Caso,Casi,A,B,C,D,E,F,G,h,Clp,Ind_Me,Ambetto,k,flFig
Dim Amba(1),Ambo(3),Ambo1(3),Posta(1),Poste(2),Ruo(3),Ruo1(2)



FIn = EstrazioneFin
If FIn < 1 Then
MsgBox "Archivio estrazioni non disponibile!",vbCritical
Exit Sub
End If

' --- Input utente ---
Ini = InputBox("Inserisci l'estrazione da cui iniziare",,FIn - 300)
If Ini = "" Or Not IsNumeric(Ini) Or CLng(Ini) < 1 Or CLng(Ini) > FIn Then Exit Sub
Ini = CLng(Ini)

Clp = InputBox("Per quanti colpi vuoi giocare?",,13)
If Clp = "" Or Not IsNumeric(Clp) Or CInt(Clp) < 1 Then Clp = 13
Clp = CInt(Clp)

Ind_Me = InputBox("Inserisci l'indice mensile da cercare (es. 1)",,1)
If Ind_Me = "" Or Not IsNumeric(Ind_Me) Then Ind_Me = 13
Ind_Me = CInt(Ind_Me)

' --- Impostazioni giocate ---
Posta(1) = 1
Poste(2) = 1


Ruo(1) = MI_ : Ruo(2) = NZ_ : Ruo(3) = TT_

Casi = 0

' --- Ciclo principale ---
For Es = Ini To FIn
If IndiceMensile(Es) = Ind_Me Then
Messaggio Es
AvanzamentoElab Ini,FIn,Es

' --- Estrai numeri con controllo Null ---
Dim tA,tB,tC,tD,tE,tf,tg,th
tA = Estratto(Es,MI_,1) ' Milano, 2° estratto
tB = Estratto(Es,PA_,4) ' Milano, 3° estratto
tC = Estratto(Es,BA_,4) ' Roma, 3° estratto
tD = Estratto(Es,VE_,5) ' Palermo, 2° estratto
tE = Estratto(Es,MI_,3) ' Milano, 3° estratto.
tf = Estratto(Es,TO_,5) ' Torino , 5° estratto
tg = Estratto(Es,MI_,1) ' Milano, 1° estratto
th = Estratto(Es,MI_,5) ' Milano, 5° estratto.

If IsNull(tA) Or IsNull(tB) Or IsNull(tC) Or IsNull(tD) Or IsNull(tE) Or IsNull(tf) Or IsNull(tg) Or IsNull(th) Then
Continue
End If

A = CInt(tA)
B = CInt(tB)
C = CInt(tC)
D = CInt(tD)
E = CInt(tE)
F = CInt(tf)
G = CInt(tg)
h = CInt(th)



Scrivi " Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)
Scrivi ""




N1 = Fuori90(A + 18)
N2 = Fuori90(A + 57)
(esempio test)

questo è un esempio

devo inserire la ricerca della prima estrazione del tipo Gennaio/Febbraio
Marzo/Aprile
ecc...
domanda esiste una funzione

grazie
 
So ma per ogni due mesi deve fare calcoli diversi
se vuoi avere contemporaneamente l'indice mese di 2 mesi diversi si devono fare calcoli diversi .
Qualsiasi cosa tu cerchi vai nell'Help che la trovi, anche il caffè

nel ciclare le estrazioni usa if x il mese e per l'indice mensile

Codice:
Sub Main
    Dim Ini,fin,es,tmp,casi,r
    tmp = 500
    fin = EstrazioneFin
    Ini = EstrazioneFin - tmp
    casi = 0
    r = 1
    For es = Ini To fin
        If(Mese(es) = 1 Or Mese(es) = 2) And IndiceMensile(es) = 1 Then
            Messaggio "   Ricerca mese  " & MeseNome(Mese(es))
            Scrivi DataEstrazione(es) & "  " & FormatSpace(MeseNome(Mese(es)),10) & "  " & StringaEstratti(es,r)
        End If
        If(Mese(es) = 11 Or Mese(es) = 12) And IndiceMensile(es) = 1 Then
            Messaggio "   Ricerca mese  " & MeseNome(Mese(es))
            Scrivi DataEstrazione(es) & "  " & FormatSpace(MeseNome(Mese(es)),10) & "  " & StringaEstratti(es,r)
        End If
    Next
End Sub
 
Sub Main

Const BA_ = 1
Const CA_ = 2
Const FI_ = 3
Const GE_ = 4
Const MI_ = 5
Const NA_ = 6
Const PA_ = 7
Const RM_ = 8
Const TO_ = 9
Const VE_ = 10
Const NZ_ = 11
Const TT_ = 12

Dim FIn,Es,Es2,Ini,N1,N2,N3,N4,N5,N6,Retnum,Retvinc
Dim Caso,Casi,A,B,C,D,E,F,G,h,Clp,Ind_Me,Ambetto,k,flFig
Dim Amba(1),Ambo(3),Ambo1(3),Posta(1),Poste(2),Ruo(3),Ruo1(2)



FIn = EstrazioneFin
If FIn < 1 Then
MsgBox "Archivio estrazioni non disponibile!",vbCritical
Exit Sub
End If

' --- Input utente ---
Ini = InputBox("Inserisci l'estrazione da cui iniziare",,FIn - 300)
If Ini = "" Or Not IsNumeric(Ini) Or CLng(Ini) < 1 Or CLng(Ini) > FIn Then Exit Sub
Ini = CLng(Ini)

Clp = InputBox("Per quanti colpi vuoi giocare?",,13)
If Clp = "" Or Not IsNumeric(Clp) Or CInt(Clp) < 1 Then Clp = 13
Clp = CInt(Clp)

Ind_Me = InputBox("Inserisci l'indice mensile da cercare (es. 1)",,1)
If Ind_Me = "" Or Not IsNumeric(Ind_Me) Then Ind_Me = 13
Ind_Me = CInt(Ind_Me)

' --- Impostazioni giocate ---
Posta(1) = 1
Poste(2) = 1


Ruo(1) = MI_ : Ruo(2) = NZ_ : Ruo(3) = TT_

Casi = 0

' --- Ciclo principale ---devo aggiungere questi mesi (Gennaio/Febbraio) (Marzo/Aprile)
For es = Ini To fin<br> If(Mese(es) = 1 Or Mese(es) = 2) And IndiceMensile(es) = 1 Then<br> Messaggio " Ricerca mese " &amp; MeseNome(Mese(es))<br> Scrivi DataEstrazione(es) &amp; " " &amp; FormatSpace(MeseNome(Mese(es)),10) &amp; " " &amp; StringaEstratti(es,r)<br> End If<br> If(Mese(es) = 11 Or Mese(es) = 12) And IndiceMensile(es) = 1 Then<br> Messaggio " Ricerca mese " &amp; MeseNome(Mese(es))<br> Scrivi DataEstrazione(es) &amp; " " &amp; FormatSpace(MeseNome(Mese(es)),10) &amp; " " &amp; StringaEstratti(es,r)<br> End If

' --- Estrai numeri con controllo Null ---
Dim tA,tB,tC,tD,tE,tf,tg,th
tA = Estratto(Es,MI_,1) ' Milano, 2° estratto
tB = Estratto(Es,PA_,4) ' Milano, 3° estratto
tC = Estratto(Es,BA_,4) ' Roma, 3° estratto
tD = Estratto(Es,VE_,5) ' Palermo, 2° estratto
tE = Estratto(Es,MI_,3) ' Milano, 3° estratto.
tf = Estratto(Es,TO_,5) ' Torino , 5° estratto
tg = Estratto(Es,MI_,1) ' Milano, 1° estratto
th = Estratto(Es,MI_,5) ' Milano, 5° estratto.

If IsNull(tA) Or IsNull(tB) Or IsNull(tC) Or IsNull(tD) Or IsNull(tE) Or IsNull(tf) Or IsNull(tg) Or IsNull(th) Then
Continue
End If

A = CInt(tA)
B = CInt(tB)
C = CInt(tC)
D = CInt(tD)
E = CInt(tE)
F = CInt(tf)
G = CInt(tg)
h = CInt(th)



Scrivi " Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)
Scrivi ""


per ogni coppia di mesi deve fare calcoli diversi su ruote diverse

N1 = Fuori90(A + 18) tipo questo di gennaio febbraio
N2 = Fuori90(A + 57)
(esempio test)


N1 = Fuori90(B + 18) tipo questo di Marzo Aprile
N2 = Fuori90(B + 57)
questo è un esempio

devo inserire la ricerca della prima estrazione del tipo Gennaio/Febbraio
Marzo/Aprile
ecc...
domanda esiste una funzione

grazie
 
Rispondo alla tua domanda: esiste una funzione? NO

Scusami ma se non sai dove e come inserire i "tuoi calcoli" nel mio costrutto come fai a pensare di realizzare lo script?

Hai costruito un costrutto pieno di cose discutibili . Te le elenco in codice per cui mettilo nella pagina di gestione script e leggilo accuratamente.
Se hai altre domande chiedi pure.

Codice:
Sub Main

Const BA_ = 1 ' tutte queste Const non servono a niente Spaziometria le ha insite nel programma queste Costanti
Const CA_ = 2
     Dim FIn,Es,Es2,Ini,N1,N2,N3,N4,N5,N6,Retnum,Retvinc
     Dim Caso,Casi,a,B,C,D,E,F,G,h,Clp,Ind_Me,Ambetto,k,flFig
     Dim Amba(1),Ambo(3),Ambo1(3),Posta(1),Poste(2),Ruo(3),Ruo1(2)
     FIn = EstrazioneFin
 
     If FIn < 1 Then 'Controllo assurdo ed inutile
     MsgBox "Archivio estrazioni non disponibile!",vbCritical
     Exit Sub
     End If

     ' --- Input utente ---
     Ini = InputBox("Inserisci l'estrazione da cui iniziare",,FIn - 300)
     If Ini = "" Or Not IsNumeric(Ini) Or CLng(Ini) < 1 Or CLng(Ini) > FIn Then Exit Sub ' controllo assurdo
     Ini = CLng(Ini) ' Ini lo lo prende anche senza trasformare il Valore
'Funzione CLng: Restituisce un'espressione che è stata convertita in un valore Variant del sottotipo Long.
     Clp = InputBox("Per quanti colpi vuoi giocare?",,13)
     If Clp = "" Or Not IsNumeric(Clp) Or CInt(Clp) < 1 Then Clp = 13 ' controllo assurdo
     Clp = CInt(Clp)  'Clp lo lo prende anche senza trasformare il Valore
'Funzione CInt : Restituisce un'espressione che è stata convertita in un valore Variant del sottotipo Integer.
     Ind_Me = InputBox("Inserisci l'indice mensile da cercare (es. 1)",,1)
     If Ind_Me = "" Or Not IsNumeric(Ind_Me) Then Ind_Me = 13 ' controllo assurdo

     Ind_Me = CInt(Ind_Me) ' lo lo prende anche senza trasformare il Valore

     ' --- Impostazioni giocate ---
     Posta(1) = 1
     Poste(2) = 1
     Ruo(1) = MI_ : Ruo(2) = NZ_ : Ruo(3) = TT_
     Casi = 0
      
     ' --- Estrai numeri con controllo Null ---
Dim tA,tB,tC,tD,tE,tf,tg,th
tA = Estratto(Es,MI_,1) ' Milano, 2° estratto
tB = Estratto(Es,PA_,4) ' Milano, 3° estratto
tC = Estratto(Es,BA_,4) ' Roma, 3° estratto
tD = Estratto(Es,VE_,5) ' Palermo, 2° estratto
tE = Estratto(Es,MI_,3) ' Milano, 3° estratto.
tf = Estratto(Es,TO_,5) ' Torino , 5° estratto
tg = Estratto(Es,MI_,1) ' Milano, 1° estratto
th = Estratto(Es,MI_,5) ' Milano, 5° estratto.

If IsNull(tA) Or IsNull(tB) Or IsNull(tC) Or IsNull(tD) Or IsNull(tE) Or IsNull(tf) Or IsNull(tg) Or IsNull(th) Then
Continue ''' Controllo inutile a meno che tu non usi date archivio in cui non vi siano estrazioni sulle ruote di tuo interesse.
' Funzione IsNull: Restituisce un valore booleano che indica se un'espressione include o meno dati non validi (Null).

End If

a = CInt(tA) ' stai parlando di numeri che sono utilizzabili così come sono quindi qui questi Cint non servono a niente
B = CInt(tB)
C = CInt(tC)
D = CInt(tD)
E = CInt(tE)
F = CInt(tf)
G = CInt(tg)
h = CInt(th)

Scrivi " Estrazione n." & Format2(Es) & " del " & DataEstrazione(Es)
Scrivi ""

Ps: Tutte le funzioni di trasformazioni che hai usato, in Spaziometria in genere non servono perchè il suo motore operativo "Spazioscript " non ne ha bisogno
Saluti
 
Ultima modifica:
Salve sicuramente mi sono espresso male quindi penso che la cosa più semplice sia fare uno script per ogni due mesi modificando ruote e calcoli da fare sinceramente pensavo si poteva fare per vedere tutto l'anno cosa dava grazie comunque.

Dajee
 

Ultima estrazione Lotto

  • Estrazione del lotto
    martedì 18 novembre 2025
    Bari
    07
    35
    82
    62
    16
    Cagliari
    60
    42
    25
    31
    51
    Firenze
    48
    36
    03
    35
    25
    Genova
    17
    57
    09
    66
    85
    Milano
    69
    78
    37
    85
    16
    Napoli
    08
    27
    17
    26
    68
    Palermo
    24
    77
    19
    79
    45
    Roma
    45
    14
    27
    21
    07
    Torino
    27
    51
    35
    76
    63
    Venezia
    52
    05
    46
    10
    53
    Nazionale
    23
    69
    01
    02
    38
    Estrazione Simbolotto
    Torino
    24
    44
    23
    21
    02

Ultimi Messaggi

Indietro
Alto