I am making a timmer just for fun,its it to keep time for when I cook something, I already have it set to when I click On start the timmer starts to count on screen, then if I click stop it stops.I also have an input to where you can put in the time it takes for your meal to cook.The problem Im having is I need to make a call if your time = the timmer clock then the clock will stop and sound a bell, well I cant figure out how to make my input string = the timmer is all.here is what I have so far, its real simple code and basic but cool.
`Stopwatch
ink rgb(255,255,255),1
set text font "courier"
load image "clock.jpg",1
load sound "alarm.wav",1
starttime=timer()
do
INPUT "set your time>";name$
if returnkey()=1 then GOSUB timemer
sync
loop
timemer:
cls
sync
do
paste image 1,50,0
Global Standard : Standard = RGB(255,255,255):Global Selected : Selected = RGB(280,280,255)
If HyperLink(0,30,"Start") = 1 Then start=1:starttime=timer():secs=0:tens=0:mins=0:tenmins=0:hours=0
If HyperLink(0,50,"Stop") = 1 Then start=0
if start=1
time=timer()-starttime
secs=val(left$(str$(time/1000),2))
if secs>9 then :secs=0:tens=tens+1:starttime=timer()
if tens>5 then tens=0:mins=mins+1
if mins>9 then mins=0:tenmins=tenmins+1
if tenmins>5 then tenmins=0:hours=hours+1
endif
set text size 25
CENTER TEXT 310,5,"TIMER CLOCK"
set text size 25
CENTER TEXT 90,340,"your time ="+ name$
CENTER text 120,240,str$(hours)+":"+right$(str$(tenmins),1)+right$(str$(mins),1)+":"+right$(str$(tens),1)+left$(str$(secs),1)+"."+right$(str$(time),3)
set text size 10
rem where I want my time to match clock time,cant figure it out.
rem if name=starttime then play sound 1 ?
loop
Function HyperLink(X,Y,String$)
If MouseX() > X And MouseX() < X + Text Width(String$) And MouseY() > Y And MouseY() < Y + Text Height(String$)
Ink Selected,0
Text X,Y,String$
Click = MouseClick()
Else
Ink Standard,0
Text X,Y,String$
Click = 0
EndIf
EndFunction Click
my signature keeps being erased by a mod So this is my new signature.