Script Despertador
Moderator: Gio
-
- Posts: 23
- Joined: 01 Apr 2021, 09:51
Script Despertador
Alguem teria algum script que funcione como um despertador por exemplo 12:00 ele começa apitar ate ser desligado
Re: Script Despertador
boa tarde
soundplay
Code: Select all
#Warn
#Persistent
R:=0
SetTimer, CheckTime, 5000 ;-- check every 5 seconds
gosub,checktime
Return
;-----------------------
CheckTime:
T:= A_Hour . A_Min
if T=%R%
return
If ((T=1200) || (T=1500)) ;- if 12:00 or 15:00
{
run,charmap ;- do something
R=%T%
return
}
return
;----------------------
esc::exitapp
;======================
Code: Select all
#Warn
#Persistent
Global T,active := 1
R:=0
SetTimer, CheckTime, 5000 ;-- check every 5 seconds
gosub,checktime
Return
;-----------------------
CheckTime:
T:= A_Hour . A_Min
if T=%R%
return
If ((T=1200) || (T=1500)) ;- if 12:00 or 15:00
{
gosub,C1
R=%T%
return
}
return
;----------------------
C1:
;Global active := 1
While, active A1()
Return
A1()
{
loop
{
tooltip,Alarm Running TIME=%T% .....
SoundPlay,%A_WinDir%\Media\Ring02.wav,wait ;- soundplay until key ESC
;SoundBeep, 500, 1220
}
Until, !active
}
return
esc::
{
tooltip
active:=0
return
}
;======================