Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test := TimeFormatHMS(%InputBoxContents%, h, m, s)
- Gui, Add, Edit, x2 y149 w80 h20 vInputBoxContents, 1200000
- Gui, Add, Text, vVar, %test%
- Gui, Add, Button, gSubmit, SUBMIT
- Gui, Show, w404 h464, Auto Update Text String parsed from milisecond-based editbox (convert to hours, minutes, seconds)
- Return
- Submit:
- Gui, Submit, NoHide
- MsgBox, This is the variable contents directly from the editbox: %InputBoxContents%
- test2 := TimeFormatHMS(%InputBoxContents%, h, m, s)
- MsgBox, This is the variable contents that the text label (based on editbox input piped through the TimeFormat Function below) has: %test2%
- GuiControl, Text, Var, %test2%
- Gui, Submit, NoHide
- Return
- TimeFormatHMS(milli, ByRef hours=0, ByRef mins=0, ByRef secs=0, secPercision=0)
- {
- Gui, Submit, NoHide
- SetFormat, FLOAT, 0.%secPercision%
- milli /= 1000.0
- secs := mod(milli, 60)
- SetFormat, FLOAT, 0.0
- milli //= 60
- mins := mod(milli, 60)
- hours := milli //60
- return hours . ":" . mins . ":" . secs
- }
- GuiClose:
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement