Sub Main
51Testing软件测试网O
A1TJU,QF Dim y as variant
51Testing软件测试网m4W`0kT E:z Dim msgtext as String
51Testing软件测试网/ZLm,@a%JP7B Ra Dim nowhr as Integer
51Testing软件测试网Q"Gh,lo'?u3lau Dim nowmin as Integer
;L ]
_Tj7b+v%?0 dim x as string
s:o-lP6?0 dim nowmonth as integer
pgVs$n Y6p/?f0#hl-~lGUlW|tLH0 Window SetContext, "Class=Shell_TrayWnd", ""
51Testing软件测试网cIy7]"tg!e nowhr=Hour(Now) 'Hour(time) 传回时间的小时字段,型态是Integer
51Testing软件测试网/yX+].nu nowmin=Minute(Now) 'Minute(time) 取得时间内容的分部分,型态为Integer。
4f!EK
J*MTF0 y = "Text=" & Trim(str(nowhr))+":" & Trim(str(nowmin)) 'Trim(string()) 去掉字符串开头和结尾的空白
WUOc'Rx]0 MsgBox y 'Str(number) 将数字转为字符串后传回
51Testing软件测试网j8F n njU/?~DEk~5x Window SetContext, "Class=Shell_TrayWnd", ""
51Testing软件测试网?R}j%^S4V
l GenericObject DblClick, y, "Coords=31,15"
51Testing软件测试网#[S0K8U/~YvjblDn` rem Window SetContext, "Caption=日期和时间 属性", ""
51Testing软件测试网 }'E"BRn2i&k`u0vz@ Window SetTestContext, "Caption=日期和时间 属性", ""
51Testing软件测试网A4w2t:H)@uMr[(N ComboBox Click, "ObjectIndex=1", "Coords=66,5"
51Testing软件测试网:v%gcI2ss,G0}@.? nowmonth=Month(now) 'Month(date) 取得日期的月部分,型态为Integer
51Testing软件测试网1l8_0a8b9H5}I y=trim(str(nowmonth))
:_jq
v-a?2]0 msgbox y
51Testing软件测试网;VP5\,X%NJ:yhSA1x if y=1 then
51Testing软件测试网t'L+uE3]F
R+YX y="一" & "月"
51Testing软件测试网h,uq"N/fVV-?M.M end if
51Testing软件测试网
u
}EpD0StG msgbox y
6}.g6nn&?(D0 ComboListBox Click, "ObjectIndex=1", "Text=" & y
k2b,rK\oE PT9u0 PushButton Click, "Text=确定"
51Testing软件测试网!N+{-~ e8U(uu
tWEnd Sub
51Testing软件测试网 Gzu0xAEb+JS51Testing软件测试网!Z{0A
v^(k:{待完善!!!
]:\a
SR_"e?
o0