En faite mon but est de céer un script qui s'executerai tous les 10 minutes...
Je suis encore un novice en la matiére, si quelqu'un pourrait m'aider

Merci

Code : Tout sélectionner
Sleep(10000)
Code : Tout sélectionner
While 1
if _DateTimeFormat( _NowCalc(),4) = $sNewDate Then
$sNewDate = _DateAdd( 'n',10, _NowCalc())
$sNewDate = _DateTimeFormat($sNewDate,4)
MsgBox( 4096, "", "Heure +10 minutes: " & $sNewDate )
EndIf
WEnd
Il faudrais voir quel type de script vous compter lancer toutes les dix minutes.Kurser a écrit :Désolé mais peux-tu me donner un exemple de boucle??
Code : Tout sélectionner
MsgBox( 4096, "", "Heure +10 minutes: " & $sNewDate )
Code : Tout sélectionner
#include <Misc.au3>
; Controle si l'application est déja lancée.
If _Singleton ( @ScriptFullPath , 1 ) = 0 Then Exit
; Combinaison de touche pour quitter le script en cours.
HotKeySet ( " + !s" , "Fin" ) ; Shift - Alt - s pour sortir du script.
While 1
RunWait ( "C:\Batch\MonBatch.bat" , "" , @SW_HIDE )
Sleep ( 1000 * 600 ) ; 1000ms * ( 10mn = 10 * 60s = 600 )
WEnd
Func Fin ( )
Exit
EndFunc
Code : Tout sélectionner
#include <Date.au3>
; Controle si l'application est déja lancée.
If _Singleton ( @ScriptFullPath , 1 ) = 0 Then Exit
; Combinaison de touche pour quitter le script en cours.
HotKeySet ( " + !s" , "Fin" ) ; Shift - Alt - s pour sortir du script.
$sNewDate = _DateAdd ( 'n' , 10 , _NowCalc ( ) )
While 1
If _DateTimeFormat ( _NowCalc ( ) , 4 ) = $sNewDate Then
$sNewDate = _DateAdd ( 'n' , 10 , _NowCalc ( ) )
$sNewDate = _DateTimeFormat ( $sNewDate , 4 )
RunWait ( "C:\Batch\MonBatch.bat" , "" , @SW_HIDE )
EndIf
WEnd
Func Fin ( )
Exit
EndFunc
Code : Tout sélectionner
$begin = TimerInit ( )
sleep ( 3000 )
$dif = TimerDiff ( $begin )
MsgBox ( 0 , "Time Difference" , $dif )
Code : Tout sélectionner
$begin = TimerInit ( )
while 1
sleep ( 1 )
if TimerDiff ( $begin ) > 5000 then exit msgbox ( 0 , "Timer" , "5 secondes deja !" )
wend
Code : Tout sélectionner
$begin = TimerInit ( )
Sleep ( 1000 * 600 )
$dif = TimerDiff ( $begin )
MsgBox ( 0 , "Time Difference" , StringFormat ( "%d secondes" , $dif/1000 ) )