Bonjour ! Je dois développer un programme pour une petite entreprise, mais ça ne fonctionne pas :'( pouvez-vous me dire ce qui ne vas pas ?
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
dim date
do
	date = weekday(date)
 
	if date = 7 then
		if Hour(Now)=17 then
			if Minute(now)=21 then
				if Seconde(Now)=1 then
					Set Sh = CreateObject("WScript.Shell")
					Sh.run ".\18.bat"
					Set Sh = Nothing
				end if
			end if
		end if
	end if
 
	if date < 7 then 
		if Hour(Now)=14 then
			if Minute(now)=21 then
				if Seconde(Now)=0 then
					Set Sh = CreateObject("WScript.Shell")
					Sh.run ".\12.bat"									
					Set Sh = Nothing
				end if
			end if
		end if
	end if
loop
Par ailleur, mon premier était celui-ci, même question, qu'est-ce qui cloche ?
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
46
47
48
49
50
51
52
53
dim date
date = weekday(date)
 
if date = 7 then
	call dimanche
	else
	call semaine
end if
 
fonction semaine
do
	if Hour(Now)=11 then
		if Minute(now)=50 then
			if Seconde(Now)=1 then
				Set Sh = CreateObject("WScript.Shell")
				Sh.run ".\12.bat"
				Set Sh = Nothing
				exit loop
			end if
		end if
	end if
 
loop
end fonction
 
do	
	if Hour(Now)=18 then
		if Minute(now)=50 then
			if Seconde(Now)=1 then
				Set Sh = CreateObject("WScript.Shell")
				Sh.run ".\19.bat"
				Set Sh = Nothing
				exit loop
			end if
		end if
	end if
loop
 
fonction dimanche
 
do	
	if Hour(Now)=17 then
		if Minute(now)=50 then
			if Seconde(Now)=1 then
				Set Sh = CreateObject("WScript.Shell")
				Sh.run ".\18.bat"
				Set Sh = Nothing
				exit loop
			end if
		end if
	end if
loop
end fonction
Merci :*