Sub Main
/bt!Z k2|/D|$x.cTa |0 Dim y as variant
51Testing软件测试网U!h-B]6b+v*U*[3ohb Dim msgtext as String
51Testing软件测试网"K:VHK``0~ Dim nowhr as Integer
51Testing软件测试网"R Q*k#T(m Dim nowmin as Integer
51Testing软件测试网|?)l.d{Y:Zmv dim x as string
a)q^\.x${3h'^0 dim nowmonth as integer
51Testing软件测试网;gP"W2Oz}3~
]4L!~1b$nq0 Window SetContext, "Class=Shell_TrayWnd", ""
dBC_,i(Q0 nowhr=Hour(Now) 'Hour(time) 传回时间的小时字段,型态是Integer
'wt!Rp%J0AO
j0 nowmin=Minute(Now) 'Minute(time) 取得时间内容的分部分,型态为Integer。
51Testing软件测试网D*u-DFDF y = "Text=" & Trim(str(nowhr))+":" & Trim(str(nowmin)) 'Trim(string()) 去掉字符串开头和结尾的空白
G?4H&ra0 MsgBox y 'Str(number) 将数字转为字符串后传回
51Testing软件测试网(iaii
w;vI1o!N Window SetContext, "Class=Shell_TrayWnd", ""
51Testing软件测试网(LZ`3M7W1F'^8y*`p GenericObject DblClick, y, "Coords=31,15"
51Testing软件测试网|$yxk@^$g\:f rem Window SetContext, "Caption=日期和时间 属性", ""
,cW8]v
A/vY0 Window SetTestContext, "Caption=日期和时间 属性", ""
51Testing软件测试网f3G&CJG ComboBox Click, "ObjectIndex=1", "Coords=66,5"
6LlPS#o1J-] |'H0 nowmonth=Month(now) 'Month(date) 取得日期的月部分,型态为Integer
]]0E6P:h4@8@e0 y=trim(str(nowmonth))
~p9b
C N*Hv0 msgbox y
51Testing软件测试网|SHx.O2v0OL if y=1 then
51Testing软件测试网[:M+`8S6_q
TAk y="一" & "月"
51Testing软件测试网p*^ri/{NE end if
51Testing软件测试网3nI~SOK5h
A&}j@ msgbox y
51Testing软件测试网:kQ5^#@kGdL ComboListBox Click, "ObjectIndex=1", "Text=" & y
51Testing软件测试网r
r;Y!D.f} PushButton Click, "Text=确定"
j$U~~r-o8b?;I]0End Sub
51Testing软件测试网'gsSOv51Testing软件测试网
by$A\O
a$Q待完善!!!
51Testing软件测试网.j0]T bJA'`fP