scodinzolo
Member
Buonasera,
ho ritrovato un vecchio script per l8, trovato anni addietro in rete (MIO di Mirco), ho cercato di farlo girare in spaziometria ma mi restituisce un errore di cui allego screen.
Volevo, gentilmente, chiedere se è possibile correggerlo al fine di poterlo usare con il programma Spaziometria.
Vi ringrazio.
Buona serata
Sub main()
Dim n(15)
Dim sp(3)
Dim am(1)
Dim ab(5)
Dim ac(1)
Dim ru(2)
Dim nu(2)
Dim posta(1)
Dim poste(2)
Dim est(6)
posta(1)=1
poste(2)=1
cn=0
stp=InputBox("VUOI INTERROMPERE LE GIOCATE AL 1° ESITO POSITIVO ???"&_
Chr(13)&Chr(13)& "SI = 1" &Chr(13)& "NO = 0",,1)
'==========================INSERIRE LE 15 FORMULE DI 9 NUMERI TRA GLI APICI >""<
'I PRIMI TRE SARANNO LE 3 SPIE, IL 4° L'AMBATA, IL 5°-6°-7°-8°
'GLI ABBINAMENTI ED IL 9° L'ULTIMO ELEMENTO DELLA CINQUINA
n(01)="17.44.71.19.10.55.28.73.64"
n(02)="18.45.72.22.13.58.31.76.67"
n(03)="19.46.73.25.16.61.34.79.70"
n(04)="21.57.84.04.13.58.40.85.49"
n(05)="22.58.85.07.16.61.43.88.52"
n(06)="23.59.86.10.19.64.01.46.55"
n(07)="24.51.87.04.13.58.40.85.49"
n(08)="25.52.88.07.16.61.43.88.52"
n(09)="26.53.89.10.19.64.46.01.55"
n(10)="27.54.81.04.13.58.40.85.49"
n(11)="28.55.82.07.16.61.43.88.52"
n(12)="29.56.83.10.19.64.46.01.55"
n(13)="48.75.84.04.22.67.31.76.49"
n(14)="49.76.85.07.25.70.34.79.52"
n(15)="51.78.87.13.31.76.40.85.58"
'===========================================================
fin=EstrazioneFin
ini=fin-14'<----------aumentando il 100 si aumentano le estr. del controllo
For es=ini To fin
Messaggio es
For y=1 To 15
If n
>"" Then
Erase am: Erase ab: Erase ac
nr=n
nr="0."&nr
nm=Split(nr,".")
sp(1)=CInt(nm(1))
sp(2)=CInt(nm(2))
sp(3)=CInt(nm(3))
am(1)=CInt(nm(4))
cx=0
For x=5 To 8
cx=cx+1:ab(cx)=CInt(nm(x))
Next
ac(1)=nm(9)
For r=1 To 10
For p=1 To 4
a=Estratto (es,r,p)
If a=sp(1) Or a=sp(2) Or a=sp(3) Then
For q=p+1 To 5
b=Estratto (es,r,q)
If b=sp(1) Or b=sp(2) Or b=sp(3) Then
If a=sp(1) Or b=sp(1) Then sp(1)=0
If a=sp(2) Or b=sp(2) Then sp(2)=0
If a=sp(3) Or b=sp(3) Then sp(3)=0
OrdinaMatrice sp,-1
For r1=1 To 10
If r1<>r Then
If Posizione(es,r1,sp(1))>0 Then
cc=cc+1
ab(5)=0
Scrivi
Scrivi DataEstrazione(es)&" "& Format2(a)&"-"& Format2(b)&_
" "& Left(NomeRuota (r),2)&" "& Format2(sp(1))&" "&_
Left( NomeRuota(r1),2)&" FORMULA "& Format2
&" "&_
Format2(am(1))&"."& StringaNumeri(ab)&"."& Format2(ac(1)),1
ru(1)=r:ru(2)=r1
'ImpostaGiocata 1,am,ru,posta,14,1
cg=1
nu(1)=am(1)
For x=1 To 4
cg=cg+1
nu(2)=ab(x)
ImpostaGiocata cg,nu,ru,poste,18,2
Next
ab(5)=ac(1)
ImpostaGiocata cg+1,ab,ru,poste,18,2
If stp=1 Then
For j=2 To 6
For z=1 To 6
ImpostaInterruzioni z,1,1
ImpostaInterruzioni z,j,2
Next
Next
End If
If cc=1 Or es>(fin-14) Then
Gioca es,,True
Else
Gioca es,True,True
End If
ce=0
For j=1 To 6
If Esito(j)=True Then est(j)=est(j)+1:ce=ce+1
Next
ColoreTesto 2
If ce=0 And es<(fin-14) Then
Scrivi String(49," ")&"ESITO NEGATIVO al "& DataEstrazione(es+14)
cn=cn+1
End If
If ce=0 And es>(fin-14) Then
Scrivi String(49," ")&"Giocata in corso"
Scrivi
End If
ColoreTesto 0
End If
End If
Next
End If
Next
End If
Next
Next
End If
Next
Next
Scrivi Chr(13)&string(90,"=")
ColoreTesto 1
For j=1 To 6
If est(j)<1 Then est(j)=0
Scrivi Format2(j)&"° Giocata esiti positi n: "&est(j),1
Next
ColoreTesto 2
Scrivi Chr(13)&"Eventi giocati : "& Format2(cc)&Chr(13)&_
"Eventi positivi : "& Format2(cc-cn)&Chr(13)&_
"Eventi negativi : "& Format2(cn),1
ColoreTesto 0
ScriviResoconto
End Sub

ho ritrovato un vecchio script per l8, trovato anni addietro in rete (MIO di Mirco), ho cercato di farlo girare in spaziometria ma mi restituisce un errore di cui allego screen.
Volevo, gentilmente, chiedere se è possibile correggerlo al fine di poterlo usare con il programma Spaziometria.
Vi ringrazio.
Buona serata
Sub main()
Dim n(15)
Dim sp(3)
Dim am(1)
Dim ab(5)
Dim ac(1)
Dim ru(2)
Dim nu(2)
Dim posta(1)
Dim poste(2)
Dim est(6)
posta(1)=1
poste(2)=1
cn=0
stp=InputBox("VUOI INTERROMPERE LE GIOCATE AL 1° ESITO POSITIVO ???"&_
Chr(13)&Chr(13)& "SI = 1" &Chr(13)& "NO = 0",,1)
'==========================INSERIRE LE 15 FORMULE DI 9 NUMERI TRA GLI APICI >""<
'I PRIMI TRE SARANNO LE 3 SPIE, IL 4° L'AMBATA, IL 5°-6°-7°-8°
'GLI ABBINAMENTI ED IL 9° L'ULTIMO ELEMENTO DELLA CINQUINA
n(01)="17.44.71.19.10.55.28.73.64"
n(02)="18.45.72.22.13.58.31.76.67"
n(03)="19.46.73.25.16.61.34.79.70"
n(04)="21.57.84.04.13.58.40.85.49"
n(05)="22.58.85.07.16.61.43.88.52"
n(06)="23.59.86.10.19.64.01.46.55"
n(07)="24.51.87.04.13.58.40.85.49"
n(08)="25.52.88.07.16.61.43.88.52"
n(09)="26.53.89.10.19.64.46.01.55"
n(10)="27.54.81.04.13.58.40.85.49"
n(11)="28.55.82.07.16.61.43.88.52"
n(12)="29.56.83.10.19.64.46.01.55"
n(13)="48.75.84.04.22.67.31.76.49"
n(14)="49.76.85.07.25.70.34.79.52"
n(15)="51.78.87.13.31.76.40.85.58"
'===========================================================
fin=EstrazioneFin
ini=fin-14'<----------aumentando il 100 si aumentano le estr. del controllo
For es=ini To fin
Messaggio es
For y=1 To 15
If n

Erase am: Erase ab: Erase ac
nr=n

nr="0."&nr
nm=Split(nr,".")
sp(1)=CInt(nm(1))
sp(2)=CInt(nm(2))
sp(3)=CInt(nm(3))
am(1)=CInt(nm(4))
cx=0
For x=5 To 8
cx=cx+1:ab(cx)=CInt(nm(x))
Next
ac(1)=nm(9)
For r=1 To 10
For p=1 To 4
a=Estratto (es,r,p)
If a=sp(1) Or a=sp(2) Or a=sp(3) Then
For q=p+1 To 5
b=Estratto (es,r,q)
If b=sp(1) Or b=sp(2) Or b=sp(3) Then
If a=sp(1) Or b=sp(1) Then sp(1)=0
If a=sp(2) Or b=sp(2) Then sp(2)=0
If a=sp(3) Or b=sp(3) Then sp(3)=0
OrdinaMatrice sp,-1
For r1=1 To 10
If r1<>r Then
If Posizione(es,r1,sp(1))>0 Then
cc=cc+1
ab(5)=0
Scrivi
Scrivi DataEstrazione(es)&" "& Format2(a)&"-"& Format2(b)&_
" "& Left(NomeRuota (r),2)&" "& Format2(sp(1))&" "&_
Left( NomeRuota(r1),2)&" FORMULA "& Format2

Format2(am(1))&"."& StringaNumeri(ab)&"."& Format2(ac(1)),1
ru(1)=r:ru(2)=r1
'ImpostaGiocata 1,am,ru,posta,14,1
cg=1
nu(1)=am(1)
For x=1 To 4
cg=cg+1
nu(2)=ab(x)
ImpostaGiocata cg,nu,ru,poste,18,2
Next
ab(5)=ac(1)
ImpostaGiocata cg+1,ab,ru,poste,18,2
If stp=1 Then
For j=2 To 6
For z=1 To 6
ImpostaInterruzioni z,1,1
ImpostaInterruzioni z,j,2
Next
Next
End If
If cc=1 Or es>(fin-14) Then
Gioca es,,True
Else
Gioca es,True,True
End If
ce=0
For j=1 To 6
If Esito(j)=True Then est(j)=est(j)+1:ce=ce+1
Next
ColoreTesto 2
If ce=0 And es<(fin-14) Then
Scrivi String(49," ")&"ESITO NEGATIVO al "& DataEstrazione(es+14)
cn=cn+1
End If
If ce=0 And es>(fin-14) Then
Scrivi String(49," ")&"Giocata in corso"
Scrivi
End If
ColoreTesto 0
End If
End If
Next
End If
Next
End If
Next
Next
End If
Next
Next
Scrivi Chr(13)&string(90,"=")
ColoreTesto 1
For j=1 To 6
If est(j)<1 Then est(j)=0
Scrivi Format2(j)&"° Giocata esiti positi n: "&est(j),1
Next
ColoreTesto 2
Scrivi Chr(13)&"Eventi giocati : "& Format2(cc)&Chr(13)&_
"Eventi positivi : "& Format2(cc-cn)&Chr(13)&_
"Eventi negativi : "& Format2(cn),1
ColoreTesto 0
ScriviResoconto
End Sub
