AHK把指定的秒数转换成相应的小时数, 分钟数和秒数 (hh:mm:ss 格式).
; 下面的函数把指定的秒数转换成相应的 ; 小时数, 分钟数和秒数 (hh:mm:ss 格式). MsgBox % FormatSeconds(7384) ; 7384 = 2 小时 + 3 分钟 + 4 秒. 它的结果: 2:03:04 FormatSeconds(NumberOfSeconds) ; 把指定的秒数转换成 hh:mm:ss 格式. { time = 19990101 ; 任意日期的 *午夜*. time += %NumberOfSeconds%, seconds FormatTime, mmss, %time%, mm:ss return NumberOfSeconds//3600 ":" mmss /* ; 和上面方法不同的是,这里不支持超过 24 小时的秒数: FormatTime, hmmss, %time%, h:mm:ss return hmmss */ }