Sub Main
9QT,[-L\V0 Dim y as variant
)POy;U ]i/S _0 Dim msgtext as String
51Testing软件测试网*}Tg.s"L Dim nowhr as Integer
9Ef$n7Yk^z(A2uH,p0 Dim nowmin as Integer
9vj7sm|S"`0 dim x as string
51Testing软件测试网JF&jmAUJ#T dim nowmonth as integer
51Testing软件测试网_.E)](l$IV ^auX/}8S2}bzq[5XD0 Window SetContext, "Class=Shell_TrayWnd", ""
51Testing软件测试网 W:r
|-_Fv s"f0t:{ nowhr=Hour(Now) 'Hour(time) 传回时间的小时字段,型态是Integer
@1gG0u]\4hKkD0 nowmin=Minute(Now) 'Minute(time) 取得时间内容的分部分,型态为Integer。
}RC*j\y
_5|J0 y = "Text=" & Trim(str(nowhr))+":" & Trim(str(nowmin)) 'Trim(string()) 去掉字符串开头和结尾的空白
51Testing软件测试网A
GLa9w1}!l MsgBox y 'Str(number) 将数字转为字符串后传回
mRk;M{h5O0v0 Window SetContext, "Class=Shell_TrayWnd", ""
51Testing软件测试网\Je4J8Kzx:TR GenericObject DblClick, y, "Coords=31,15"
51Testing软件测试网9Fg5C`Ph.t rem Window SetContext, "Caption=日期和时间 属性", ""
51Testing软件测试网UG$K7mM:vm'Wh[ Window SetTestContext, "Caption=日期和时间 属性", ""
PV^+a|w;dt0 ComboBox Click, "ObjectIndex=1", "Coords=66,5"
K:dm`o0 nowmonth=Month(now) 'Month(date) 取得日期的月部分,型态为Integer
lDj$lK0 y=trim(str(nowmonth))
51Testing软件测试网r"?:V]_{]Ew;n msgbox y
a\k+HF{U0 if y=1 then
51Testing软件测试网5Oqi,jb%C,]mF y="一" & "月"
:i)mrs3I1g7HC0 end if
b,@1\YB.R0 msgbox y
51Testing软件测试网 X8Wi8F]s#N$d5h$`C ComboListBox Click, "ObjectIndex=1", "Text=" & y
51Testing软件测试网z}S%a-\ PushButton Click, "Text=确定"
3S%o/pu:vw/[!d0End Sub
51Testing软件测试网+Cy;o8u6O
M4U~51Testing软件测试网Wwo ew9M待完善!!!
51Testing软件测试网$QY%?8g_v