Novità

aiuto per script

lla

Premium Member
buongiorno

qualcuno potrebbe aiutarmi ?

mi servirebbe uno script con cui ricercare su una ruota a scelta
2 somme a mia scelta che escono insieme nella stessa estrazione

esempio:
cerca su genova somma1 = 40 e cerca sempre su genova ( sempre nella stessa estrazione della prima somma)
somma2 = 32

grazie
 
Ciao
Prova questo

Codice:
Option Explicit
Sub Main
'https://forum.lottoced.com/threads/aiuto-per-script.2193197/
Dim r1,aa,s,tmp,so,so1,n1,n2,n3,n4
Dim ini,fin,es,a,b,p,p1,p2,p3,co
   r1 = CInt(InputBox("Quale Ruota Vuoi Controllare ?","RUOTA",1))
   aa = InputBox("Inserisci le 2 SOMME separate dal punto","SOMME","15.29")
   aa = "0." & aa
   s = Split(aa,"."):so = CInt(s(1)):so1 = CInt(s(2))
   tmp = CInt(InputBox("Quante Estrazioni Vuoi Controllare ?","ESTRAZIONI",100))
   co = 0
   ini = EstrazioneFin - tmp
   fin = EstrazioneFin
   Scrivi "Ricerca ambi somma Dal " & DataEstrazione(ini) & " Al " & DataEstrazione(fin),1
   For es = ini To fin
      Call AvanzamentoElab(ini,fin,es)
      Messaggio(es)
      For p = 1 To 4
         For p1 = p + 1 To 5
            For p2 = 1 To 4
               For p3 = p2 + 1 To 5
                  n1 = Estratto(es,r1,p):n2 = Estratto(es,r1,p1)
                  n3 = Estratto(es,r1,p2): n4 = Estratto(es,r1,p3)
                  a = Fuori90(n1 + n2):b = Fuori90(n3 + n4)
                  If(a = so) And(b = so1) Then
                     co = co + 1
                     Scrivi String(85,"=")
                     Scrivi DataEstrazione(es) & " / " & es & " " & SiglaRuota(r1) & "  " & StringaEstratti(es,r1),1,0
                     Scrivi "   Sm " & so & "-> (" & Format2(n1) & "." & Format2(n2) & ") P^" & p & "/" & p1,1,0,,2
                     Scrivi "  Sm " & so1 & "-> (" & Format2(n3) & "." & Format2(n4) & ") P^" & p2 & "/" & p3,1,0,,1
                     Scrivi
                  End If
               Next
            Next
         Next
      Next
   Next
   Scrivi String(85,"-")
   Scrivi "Casi Riscontrati n° " & CInt(co)
End Sub
 
ADVERTISEMENT
Ciao , se non erro, per la ricerca basterebbero 2 cicli for
Bret1=0
Bret2=0
For p1=1 to 4
For p2=p1+1 to 5
Sum=fuori90( estratto(es,r,p1)+estratto (es,e,p2))
If sum= spia1 then bret1=1
If sum= sumspia2 then bret2=1


Next
Next
If bret1=1 and bret2=1 then scrivi

Ciao scusate ma scrivo da cell
Provate se funziona
 
ciao provo a postare lo script , ma per favore controllate che funzioni, sono arruginito​
Codice:
Option Explicit
' controllare che lo script funzioni correttamente
' lo script ricerca 1 somma,1 somma ripetuta  oppure 2 somme diverse
Sub Main
   Dim nEstr
   Dim Ini
   Dim Fin
   Dim R,p1,p2
   Dim sum,sumSpia1,sumSpia2,M
   Dim qSumSpia
   nEstr = CInt(InputBox("inserisci numero concorsi ,concorsi max=" & EstrazioneFin - EstrazioneIni + 1,"Concorsi da esaminare",100)) - 1
   sumSpia1 = CInt(InputBox("Inserisci una somma compresa tra 1 e 90","inserisci sommaSpia1",90))
   sumSpia2 = CInt(InputBox("sumSpia1=" & sumSpia1,"inserisci sommaSpia2",90))
   If isNumeroValidoLotto(sumSpia1)=False Or isNumeroValidoLotto(sumSpia1)=False Then
    Call MsgBox("una o entrambe le somme spia non sono valide",vbYes,"Errore")
      Exit Sub
   End If

   Fin = EstrazioneFin
   Ini = Fin - nEstr
   R = ScegliRuota
   If R = 11 Then
      Call MsgBox("La Ruota Tutte non è valida",vbYes,"Errore")
      Exit Sub
   End If
   If sumSpia1 = sumSpia2 Then
      qSumSpia = CInt(InputBox("Inserisci 1 oppure 2","Quante somme spia vuoi ottenere?",2))
      Scrivi "Spia:  " & sumSpia1 & "  nVolte=" & qSumSpia
      Scrivi "Ruota: " & NomeRuota(R)
      Scrivi "Inizio:" & Ini
      Scrivi "Fine:  " & Fin
      Scrivi String(57,"=")
      Call Cerca1Somma(Ini,Fin,R,sumSpia1,qSumSpia)
   Else
      Scrivi "Spia1: " & sumSpia1
      Scrivi "Spia2: " & sumSpia2
      Scrivi "Ruota: " & NomeRuota(R)
      Scrivi "Inizio:" & Ini
      Scrivi "Fine:  " & Fin
      Scrivi String(57,"=")
      Call Cerca2Somme(Ini,Fin,R,sumSpia1,sumSpia2)
   End If
End Sub
Sub Cerca2Somme(Ini,Fin,R,SumSpia1,SumSpia2)
   Dim nEstr
   Dim bret1,bret2,M,P1,P2,sum
   For nEstr = Ini To Fin
      bret1 = 0
      bret2 = 0
      ReDim aSum(10)
      M = 0
      For P1 = 1 To 4
         For P2 = P1 + 1 To 5
            sum = Fuori90(Estratto(nEstr,R,P1) + Estratto(nEstr,R,P2))
            M = M + 1
            aSum(M) = sum
            If sum = SumSpia1 Then bret1 = 1
            If sum = SumSpia2 Then bret2 = 1
         Next
      Next
      If bret1 = 1 And bret2 = 1 Then
         Scrivi FormatSpace(nEstr,6) & "  " & StringaEstratti(nEstr,R) & "  -> " & StringaNumeri(aSum,,True)
      End If
   Next
End Sub
Sub Cerca1Somma(Ini,Fin,R,SumSpia1,qSumSpia)
   Dim nEstr
   Dim bret1,M,P1,P2,sum
   For nEstr = Ini To Fin
      bret1 = 0
      ReDim aSum(10)
      M = 0
      For P1 = 1 To 4
         For P2 = P1 + 1 To 5
            sum = Fuori90(Estratto(nEstr,R,P1) + Estratto(nEstr,R,P2))
            M = M + 1
            aSum(M) = sum
            If sum = SumSpia1 Then bret1 = bret1 + 1
         Next
      Next
      If bret1 = qSumSpia Then
         Scrivi FormatSpace(nEstr,6) & "  " & StringaEstratti(nEstr,R) & "  -> " & StringaNumeri(aSum,,True)
      End If
   Next
End Sub
ciao;)
ADVERTISEMENT

 
ciao a tutti
quando a vete tempo me lo adattate anche per il supernalotto per favore? :)
 

Ultima estrazione Lotto

  • Estrazione del lotto
    sabato 16 maggio 2026
    Bari
    84
    57
    09
    22
    60
    Cagliari
    52
    58
    80
    57
    76
    Firenze
    50
    15
    63
    58
    60
    Genova
    08
    30
    61
    75
    55
    Milano
    82
    68
    29
    16
    10
    Napoli
    86
    46
    15
    33
    65
    Palermo
    46
    29
    73
    74
    37
    Roma
    30
    15
    02
    87
    52
    Torino
    15
    62
    82
    52
    67
    Venezia
    58
    85
    40
    35
    48
    Nazionale
    16
    51
    56
    71
    17
    Estrazione Simbolotto
    Milano
    18
    07
    27
    32
    12
Indietro
Alto