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
    giovedì 26 marzo 2026
    Bari
    69
    58
    26
    05
    22
    Cagliari
    59
    33
    73
    02
    69
    Firenze
    44
    49
    83
    75
    50
    Genova
    35
    77
    61
    40
    86
    Milano
    48
    52
    12
    19
    62
    Napoli
    60
    21
    47
    15
    58
    Palermo
    16
    27
    28
    83
    25
    Roma
    35
    19
    85
    81
    24
    Torino
    29
    44
    15
    70
    31
    Venezia
    69
    20
    48
    55
    02
    Nazionale
    56
    61
    40
    27
    81
    Estrazione Simbolotto
    Firenze
    27
    22
    31
    16
    13
Indietro
Alto