Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Money Clock ~~ Dominic McGough 2001 & 2012
- 'Time is Money
- TextWindow.WriteLine ("About how much do you make per hour? (net)")
- TextWindow.Write ("Input eg. 7.50 : ")
- wage = TextWindow.Read() * 100
- TextWindow.WriteLine ("The clock should appear in a new window")
- GraphicsWindow.Width = 230
- GraphicsWindow.Height = 100
- GraphicsWindow.Left = (Desktop.Width / 2) - (GraphicsWindow.Width / 2)
- GraphicsWindow.Top = (Desktop.Height / 2) - (GraphicsWindow.Height / 2)
- GraphicsWindow.CanResize = "False"
- GraphicsWindow.Title = "Dominic's Money Clock"
- GraphicsWindow.BackgroundColor = "Black"
- GraphicsWindow.BrushColor = "dark Gray"
- GraphicsWindow.FontName = "Courier New"
- 'starting amount
- pounds = 0
- pence = 0
- moneypersec = (wage / 60 )/ 60
- StartTime = Clock.Time
- StartDate = Clock.Date
- Timer.Interval = 1000
- Timer.Tick = OnTick
- Sub OnTick
- pence = pence + moneypersec
- If pence > 99 Then
- pounds = pounds + 1
- pence = 0
- EndIf
- GraphicsWindow.Clear()
- GraphicsWindow.FontSize = 11
- GraphicsWindow.BrushColor = "cornflowerblue"
- GraphicsWindow.DrawText(0,0, " Since starting the money clock at ")
- GraphicsWindow.DrawText(0,13, " " + StartTime + " on " + StartDate)
- GraphicsWindow.DrawText(0,26, " you've made: ")
- GraphicsWindow.BrushColor = "Green"
- GraphicsWindow.FontSize = 42
- If pence < 9 Then
- GraphicsWindow.DrawText(0,42, " £" + pounds + ".0" + Math.Round(pence))
- Else
- GraphicsWindow.DrawText(0,42, " £" + pounds + "." + Math.Round(pence))
- EndIf
- GraphicsWindow.BrushColor = "darksalmon"
- GraphicsWindow.FontSize = 7
- GraphicsWindow.DrawText(0,95, " Dominic McGough 2001 & 2012")
- EndSub
Add Comment
Please, Sign In to add comment