不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           it is no use doing what you like, you have got to like what you do.

时间录制

上一篇 / 下一篇  2007-02-10 14:56:07 / 个人分类:Robot技术

Sub Main51Testing软件测试网O A1TJU,QF
    Dim y as variant51Testing软件测试网m4W`0kTE:z
    Dim msgtext as String51Testing软件测试网/Z Lm,@a%JP7B Ra
    Dim nowhr as Integer51Testing软件测试网Q"Gh,lo'?u3l au
    Dim nowmin as Integer
;L ] _T j7b+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) 传回时间的小时字段,型态是Integer51Testing软件测试网/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 n jU/?~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`u0v z @
    Window SetTestContext, "Caption=日期和时间 属性", ""51Testing软件测试网A4w2t:H)@u Mr [(N
    ComboBox Click, "ObjectIndex=1", "Coords=66,5"51Testing软件测试网:v%gcI2ss,G0}@.?
    nowmonth=Month(now)   'Month(date) 取得日期的月部分,型态为Integer51Testing软件测试网1l8_0a8b9H5}I
    y=trim(str(nowmonth))
:_jq v-a?2]0    msgbox y 51Testing软件测试网;VP5\,X%NJ:yhS A1x
    if y=1 then51Testing软件测试网t'L+uE3]F R+YX
       y="一" & "月"51Testing软件测试网h,uq"N/fVV-?M.M
     end if51Testing软件测试网 u }Ep D0StG
     msgbox y
6}.g6n n&?(D0    ComboListBox Click, "ObjectIndex=1", "Text=" & y
k2b,rK\o E PT9u0    PushButton Click, "Text=确定"51Testing软件测试网!N+{-~e8U(uu tW
End Sub51Testing软件测试网 Gz u0xA Eb+JS
51Testing软件测试网!Z{0A v^(k:{
待完善!!!
]:\a SR_"e? o0

TAG: Robot技术

 

评分:0

我来说两句

Open Toolbar