dissabte, 28 de novembre del 2009

Milutest V51 Disponible



Se puede mejorar, evidentementes, pero quien lo desee, que me deje un comentario y su mail y le enviaré un zip que contendrá:


  • el ejecutable con extensión eje. Solamente es necesario canviar eje por exe para que funcione. Gmail no permite enviar ficheros ejecutables, con lo que hay que engañarlo un poco.

  • 25 ejercicios en formato txt

  • Una carpeta con iconos de Tintín

Funcionamiento:


Descomprime el zip y cambia la extensión del fichero eje por exe. Crea un acceso directo y ponle un icono de la carpeta de iconos.
Ejecuta el fichero exe. Verás que el botón de la parte superior derecha, a diferencia de la imagen de esta entrada está activado. Púlsalo y se creará la carpeta c:\temp\examen
Pulsa el ejercicio que quieras


Para salir del programa:


Pulsa la cruz de la parte superior derecha o el botón Adéu-Guau

Si te equivocas, aparecerá un Milú-demonio que siempre podrás corregir.

Si aciertas, apareceráun Milú-angelito que te dará un punto.

Al final, pulsa el botón Nota para saber tu puntuación.



Editar (cambiar) los ficheros txt de preguntas y respuestas

Han de tener once líneas: la primera de título, las siguientes de preguntas y respuestas separadas por una coma. Ejemplo:

Para cualquier duda, ... un comentario.


CODI



1. FORM1.FRM
2. FORM2.FRM
3. MODULE1.BAS



1. FORM1.FRM
###############

Option Explicit
Private Sub cmd00_Click()
'Ruta = InputBox("Indica el fitxer dins c:\temp\Examen. Per exemple:" & _
' vbCrLf & "Angles01.txt", "El profesor Milú")
'PintaRuta
End Sub
Private Sub cmd11_Click()
Ruta = "C:\Temp\Examen\Angles01.txt"
PintaRuta
End Sub
Private Sub cmd21_Click()
Ruta = "C:\Temp\Examen\Mates01.txt"
PintaRuta
End Sub
Private Sub cmd31_Click()
Ruta = "C:\Temp\Examen\Castellano01.txt"
PintaRuta
End Sub
Private Sub cmd41_Click()
Ruta = "C:\Temp\Examen\Catala01.txt"
PintaRuta
End Sub
Private Sub cmd12_Click()
Ruta = "C:\Temp\Examen\Angles02.txt"
PintaRuta
End Sub
Private Sub cmd22_Click()
Ruta = "C:\Temp\Examen\Mates02.txt"
PintaRuta
End Sub
Private Sub cmd32_Click()
Ruta = "C:\Temp\Examen\Castellano02.txt"
PintaRuta
End Sub
Private Sub cmd42_Click()
Ruta = "C:\Temp\Examen\Catala02.txt"
PintaRuta
End Sub
Private Sub cmd13_Click()
Ruta = "C:\Temp\Examen\Angles03.txt"
PintaRuta
End Sub
Private Sub cmd23_Click()
Ruta = "C:\Temp\Examen\Mates03.txt"
PintaRuta
End Sub
Private Sub cmd33_Click()
Ruta = "C:\Temp\Examen\Castellano03.txt"
PintaRuta
End Sub
Private Sub cmd43_Click()
Ruta = "C:\Temp\Examen\Catala03.txt"
PintaRuta
End Sub
Private Sub cmd14_Click()
Ruta = "C:\Temp\Examen\Angles04.txt"
PintaRuta
End Sub
Private Sub cmd24_Click()
Ruta = "C:\Temp\Examen\Mates04.txt"
PintaRuta
End Sub
Private Sub cmd34_Click()
Ruta = "C:\Temp\Examen\Castellano04.txt"
PintaRuta
End Sub
Private Sub cmd44_Click()
Ruta = "C:\Temp\Examen\Catala04.txt"
PintaRuta
End Sub
Private Sub cmd15_Click()
Ruta = "C:\Temp\Examen\Angles05.txt"
PintaRuta
End Sub
Private Sub cmd25_Click()
Ruta = "C:\Temp\Examen\Mates05.txt"
PintaRuta
End Sub
Private Sub cmd35_Click()
Ruta = "C:\Temp\Examen\Castellano05.txt"
PintaRuta
End Sub
Private Sub cmd45_Click()
Ruta = "C:\Temp\Examen\Catala05.txt"
PintaRuta
End Sub

Private Sub PintaRuta()
Load frm2
frm2.Show

Open Ruta For Input As #1
Input #1, Dato00
frm2.txtCabecera = Dato00
Materia = Left(Dato00, 4)

If Materia = "ANGL" Or Materia = "INGL" Then
frm2.imgANGL.Visible = True
ElseIf Materia = "MATE" Then
frm2.imgMATE.Visible = True
frm2.txtQry01.Font.Size = 18
frm2.txtQry02.Font.Size = 18
frm2.txtQry03.Font.Size = 18
frm2.txtQry04.Font.Size = 18
frm2.txtQry05.Font.Size = 18
frm2.txtQry06.Font.Size = 18
frm2.txtQry07.Font.Size = 18
frm2.txtQry08.Font.Size = 18
frm2.txtQry09.Font.Size = 18
frm2.txtQry10.Font.Size = 18
ElseIf Materia = "CAST" Then
frm2.imgCAST.Visible = True
ElseIf Materia = "CATA" Then
frm2.imgCATA.Visible = True

Else
frm2.imgALTR.Visible = True
End If

Input #1, Dato01, Solucion01
frm2.txtQry01 = Dato01
Input #1, Dato01, Solucion02
frm2.txtQry02 = Dato01
Input #1, Dato01, Solucion03
frm2.txtQry03 = Dato01
Input #1, Dato01, Solucion04
frm2.txtQry04 = Dato01
Input #1, Dato01, Solucion05
frm2.txtQry05 = Dato01
Input #1, Dato01, Solucion06
frm2.txtQry06 = Dato01
Input #1, Dato01, Solucion07
frm2.txtQry07 = Dato01
Input #1, Dato01, Solucion08
frm2.txtQry08 = Dato01
Input #1, Dato01, Solucion09
frm2.txtQry09 = Dato01
Input #1, Dato01, Solucion10
frm2.txtQry10 = Dato01

Close
End Sub

Private Sub cmdPath_Click()
MkDir ("C:\Temp\Examen")
End Sub

Private Sub Form_Load()
Dim listadodir As String
Dim listadofile As String

Dim miruta As String

miruta = "C:\temp\Examen"
listadodir = Dir(miruta, vbDirectory)

If listadodir = "Examen" Then
frm1.cmdPath.Enabled = False
Else
frm1.cmdPath.Enabled = True
End If


'Dim numeret As String
numeret = 1

listadofile = Dir("c:\temp\examen\Angles0" & numeret & ".txt")
If listadofile = "Angles0" & numeret & ".txt" Then
frm1.cmd11.Enabled = True
Else
frm1.cmd11.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Mates0" & numeret & ".txt")
If listadofile = "Mates0" & numeret & ".txt" Then
frm1.cmd21.Enabled = True
Else
frm1.cmd21.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Castellano0" & numeret & ".txt")
If listadofile = "Castellano0" & numeret & ".txt" Then
frm1.cmd31.Enabled = True
Else
frm1.cmd31.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Catala0" & numeret & ".txt")
If listadofile = "Catala0" & numeret & ".txt" Then
frm1.cmd41.Enabled = True
Else
frm1.cmd41.Enabled = False
End If

numeret = numeret + 1

listadofile = Dir("c:\temp\examen\Angles0" & numeret & ".txt")
If listadofile = "Angles0" & numeret & ".txt" Then
frm1.cmd12.Enabled = True
Else
frm1.cmd12.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Mates0" & numeret & ".txt")
If listadofile = "Mates0" & numeret & ".txt" Then
frm1.cmd22.Enabled = True
Else
frm1.cmd22.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Castellano0" & numeret & ".txt")
If listadofile = "Castellano0" & numeret & ".txt" Then
frm1.cmd32.Enabled = True
Else
frm1.cmd32.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Catala0" & numeret & ".txt")
If listadofile = "Catala0" & numeret & ".txt" Then
frm1.cmd42.Enabled = True
Else
frm1.cmd42.Enabled = False
End If

numeret = numeret + 1

listadofile = Dir("c:\temp\examen\Angles0" & numeret & ".txt")
If listadofile = "Angles0" & numeret & ".txt" Then
frm1.cmd13.Enabled = True
Else
frm1.cmd13.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Mates0" & numeret & ".txt")
If listadofile = "Mates0" & numeret & ".txt" Then
frm1.cmd23.Enabled = True
Else
frm1.cmd23.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Castellano0" & numeret & ".txt")
If listadofile = "Castellano0" & numeret & ".txt" Then
frm1.cmd33.Enabled = True
Else
frm1.cmd33.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Catala0" & numeret & ".txt")
If listadofile = "Catala0" & numeret & ".txt" Then
frm1.cmd43.Enabled = True
Else
frm1.cmd43.Enabled = False
End If

numeret = numeret + 1

listadofile = Dir("c:\temp\examen\Angles0" & numeret & ".txt")
If listadofile = "Angles0" & numeret & ".txt" Then
frm1.cmd14.Enabled = True
Else
frm1.cmd14.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Mates0" & numeret & ".txt")
If listadofile = "Mates0" & numeret & ".txt" Then
frm1.cmd24.Enabled = True
Else
frm1.cmd24.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Castellano0" & numeret & ".txt")
If listadofile = "Castellano0" & numeret & ".txt" Then
frm1.cmd34.Enabled = True
Else
frm1.cmd34.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Catala0" & numeret & ".txt")
If listadofile = "Catala0" & numeret & ".txt" Then
frm1.cmd44.Enabled = True
Else
frm1.cmd44.Enabled = False
End If

numeret = numeret + 1

listadofile = Dir("c:\temp\examen\Angles0" & numeret & ".txt")
If listadofile = "Angles0" & numeret & ".txt" Then
frm1.cmd15.Enabled = True
Else
frm1.cmd15.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Mates0" & numeret & ".txt")
If listadofile = "Mates0" & numeret & ".txt" Then
frm1.cmd25.Enabled = True
Else
frm1.cmd25.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Castellano0" & numeret & ".txt")
If listadofile = "Castellano0" & numeret & ".txt" Then
frm1.cmd35.Enabled = True
Else
frm1.cmd35.Enabled = False
End If

listadofile = Dir("c:\temp\examen\Catala0" & numeret & ".txt")
If listadofile = "Catala0" & numeret & ".txt" Then
frm1.cmd45.Enabled = True
Else
frm1.cmd45.Enabled = False
End If

End Sub

2. FORM2.FRM

###############

Option Explicit
Private Sub cmdExit_Click()
End
End Sub
Private Sub cmdNota_Click()
If frm2.txtAns01 = Solucion01 Then
Resultado01 = 1
img11.Visible = True
Else
Resultado01 = 0
img21.Visible = True
End If

If frm2.txtAns02 = Solucion02 Then
Resultado01 = Resultado01 + 1
img12.Visible = True
Else
Resultado01 = Resultado01 + 0
img22.Visible = True
End If


If frm2.txtAns03 = Solucion03 Then
Resultado01 = Resultado01 + 1
img13.Visible = True
Else
Resultado01 = Resultado01 + 0
img23.Visible = True
End If


If frm2.txtAns04 = Solucion04 Then
Resultado01 = Resultado01 + 1
img14.Visible = True
Else
Resultado01 = Resultado01 + 0
img24.Visible = True
End If


If frm2.txtAns05 = Solucion05 Then
Resultado01 = Resultado01 + 1
img15.Visible = True
Else
Resultado01 = Resultado01 + 0
img25.Visible = True
End If


If frm2.txtAns06 = Solucion06 Then
Resultado01 = Resultado01 + 1
img16.Visible = True
Else
Resultado01 = Resultado01 + 0
img26.Visible = True
End If


If frm2.txtAns07 = Solucion07 Then
Resultado01 = Resultado01 + 1
img17.Visible = True
Else
Resultado01 = Resultado01 + 0
img27.Visible = True
End If


If frm2.txtAns08 = Solucion08 Then
Resultado01 = Resultado01 + 1
img18.Visible = True
Else
Resultado01 = Resultado01 + 0
img28.Visible = True
End If


If frm2.txtAns09 = Solucion09 Then
Resultado01 = Resultado01 + 1
img19.Visible = True
Else
Resultado01 = Resultado01 + 0
img29.Visible = True
End If


If frm2.txtAns10 = Solucion10 Then
Resultado01 = Resultado01 + 1
img20.Visible = True
Else
Resultado01 = Resultado01 + 0
img30.Visible = True
End If

Close #1


NotaNum = Resultado01

If NotaNum > 8 Then
Nota = "Excelente"
ElseIf NotaNum > 6 Then
Nota = "Notable"
ElseIf NotaNum > 5 Then
Nota = "Bién"
ElseIf NotaNum > 4 Then
Nota = "Suficiente"
Else
Nota = "Insuficiente"
End If

txtNota.Text = Nota


End Sub

Private Sub Image1_Click()

End Sub


3. MODULE1.BAS
###############

Cap comentari:

Publica un comentari a l'entrada