naturalmente visto che mi sono dedicato al web con la programmazione sono ancora scarso e volevo chiedere
se qualcuno mi sapeva dire dove sbaglio.
vi posto il codice di un programmino che spegne automaticamente il pc dopo un tot di tempo...
però non mi parte mi sapete dire dove sbaglio?
- Codice:
-
$shutdowntimer = InputBox ( "shutdown timer", "Inserire il tempo in cui volete che si spenga il computer in ore")
if $shutdowntimer = "0.1" Then
sleep (60000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "1" Then
sleep (3600000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "2" Then
sleep (7200000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "3" Then
sleep (10800000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "4" Then
sleep (14400000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "5" Then
sleep (18000000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "6" Then
sleep (21600000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "7" Then
sleep (25200000) Then
Shutdown(1)
EndIf
if $shutdowntimer = "8" Then
sleep (28800000) Then
Shutdown(1)
EndIf
MsgBox (0, "Grazie", "grazie per aver utilizzato il mio programma"&@crlf&@crlf&"by Abe")
e poi volevo chiedere se c'è un modo per far fare al programmino tutto da solo tipo tu scrivi 50 e lui ti calcola da solo i millisecondi di sleep è possibile?
ringrazio preventivamente...