Salut à tous

J'ai une petit problèmes de retour de variables à partir d'un formulaire.
Quand je lance mon .vbs depuis le cmd j'arrive sur mon formulaire, je le remplis et une fois cliqué sur valider il devrai me retourner mes valeurs dans le cmd ... mais rien ni le valider ni le annuler fonctionne

Je vous mets mes code .vb et .html si vs avez des idées ? j'ai portant tiré ça d'un livre mais ça ne marche pas..

mon html :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 
<html>
	<head>
		<title>Réservation DHCP</title>
	</head>
	<body>
 
		<script language="VBScript">
		<!--
			Dim ValBout
 
			Sub Window_OnLoad()
				ValBout = 0
			End Sub
			Sub VALID_Onclick
				ValBout = 1
			End Sub
 
			Sub ANNUL_Onclick
				ValBout = 2
			End Sub
 
			Public Function FncValBout()
				FncValBout = ValBout
			End Function
		'-->
		</script>
 
		<form name="ReservationDHCP">
		 <center>
		 Choix du serveur DHCP : <br>
		 <select size="1" name="ListeServeurs">
		 <option value="DHCP1">SRVDHCP1</option>
		 <option value="DHCP">SRVDHCP2</option>
		 <option value="TOUTDHCP">Les Deux</option>
		 </select><br />
		 Plages IP : <br />
		 <input type="text" size="16" name="PlageIP"><br />
			<input type="button" value="Valider" name="VALID">
			<input type="button" value="Annuler" name="ANNUL">
		 </center>
		</form>
	</body>
</html>
mon vbs :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
Dim IEShell, objIE
Set IEShell = Wscript.CreateObject("Wscript.Shell")
 
Do While true
	Set objIE = Wscript.CreateObject("InternetExplorer.Application","IE_")
	objIE.navigate "H:\test example livre\testlivrehtml.html"
	objIE.Visible = 2
 
	Do While (objIE.Busy)
		Wscript.Sleep 100
	Loop
 
	IEShell.AppActivate "ReservationDHCP"
	On Error Resume Next
 
	Do
		Wscript.Sleep 100
	Loop While(objIE.Document.Script.FncValBout() = 0)
 
	If Err <> 0 Then
		Wscript.quit
	End If
 
	ClicVal = objIE.Document.Script.FncValBout()
 
	If ClicVal = 2 Then
		objIE.Quit
		Set objIE = Nothing
		Wscript.quit
	End If
 
	strListeServeurs = objIE.Document.ReservationDHCP.ListeServeurs.value
	strPlageIP = objIE.Document.ReservationDHCP.PlageIP.value
 
	wscript.echo "ListeServeurs : " & strListeServeurs
	wscript.echo "PlageIP : " & strPlageIP
 
	CloseIE
Loop
 
Sub CloseIE
	objIE.Quit
	Set objIE = Nothing
End Sub