+=5 for time ?

Simple advice that you may find useful. Feel free to discuss or add your own.
Post Reply
wallebalboa
Senior Member
Posts: 111
Joined: Wed Aug 11, 2004 6:52 pm
Location: Sweden

+=5 for time ?

Post by wallebalboa »

any easy way to increase/decrease a time property with a button? i use the -=5 function to increase other values, is it possible to do the same with time? cant figure out the syntax... (i wanna set wake-up time easy..;-) )
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: +=5 for time ?

Post by Richard Naninck »

Just script it. I can't think of any other simple solution

Code: Select all

Sub GUI_Minute(Data)
Dim Minuut

	Minuut = CInt(GetPropertyValue ("Agenda.GUI Minute"))
	
	Select Case Data
		Case "+": Minuut = Minuut + 1
		
			  If Minuut >= 60 Then
			  	Minuut = 0
			  End If
			  
		Case "-": Minuut = Minuut - 1
		
			  If Minuut < 0 Then
			  	Minuut = 59
			  End If
	End Select
	
	Minuut = L_Pad(Minuut, 2, "0")
	SetPropertyValue "Agenda.GUI Minute", Minuut
End Sub
Post Reply