求一个计算时间的软件~
给你 AutoIt 脚本语言 .au3文件 源代码 自己去AutoIt中文论坛 下载AutoIt 编译
-- 因为你没留邮箱
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <UpdownConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("百度账号 -- veket的小号", 351, 301, 192, 114)
$Label1 = GUICtrlCreateLabel("这个时间:", 24, 32, 64, 17)
$Label2 = GUICtrlCreateLabel("经过:", 200, 32, 64, 17)
$Label3 = GUICtrlCreateLabel("变为:", 24, 128, 64, 17)
$Input1 = GUICtrlCreateInput("00", 24, 64, 41, 21)
$Updown1 = GUICtrlCreateUpdown($Input1, $UDS_WRAP+$UDS_ARROWKEYS)
GUICtrlSetLimit($Updown1, 23, 0)
$Input2 = GUICtrlCreateInput("00", 96, 64, 41, 21)
$Updown2 = GUICtrlCreateUpdown($Input2, $UDS_WRAP+$UDS_ARROWKEYS)
GUICtrlSetLimit($Updown2, 59, 0)
$Input3 = GUICtrlCreateInput("00", 200, 64, 41, 21)
$Updown3 = GUICtrlCreateUpdown($Input3, $UDS_ARROWKEYS)
$Input4 = GUICtrlCreateInput("00", 272, 64, 41, 21)
$Updown4 = GUICtrlCreateUpdown($Input4, $UDS_WRAP+$UDS_ARROWKEYS)
GUICtrlSetLimit($Updown4, 59, 0)
$Input5 = GUICtrlCreateInput("", 24, 168, 129, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY))
$Button1 = GUICtrlCreateButton("计算", 216, 184, 89, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Calc()
EndSwitch
WEnd
Func Calc()
GUICtrlSetState($Button1, $GUI_DISABLE)
$s_h = Number(GUICtrlRead($Input1))
$s_m = Number(GUICtrlRead($Input2))
$a_h = Number(GUICtrlRead($Input3))
$a_m = Number(GUICtrlRead($Input4))
$m = $s_m + $a_m
$h = $s_h + $a_h
If $m>59 Then
$h += 1
$m -= 60
EndIf
If $h>23 Then
$h -= 24
EndIf
GUICtrlSetData($Input5, $h & ":" &$m)
GUICtrlSetState($Button1, $GUI_ENABLE)
EndFunc