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

时间录制

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

Sub Main
/b t!Z k2|/D|$x.cTa|0    Dim y as variant51Testing软件测试网U!h-B]6b+v*U*[3ohb
    Dim msgtext as String51Testing软件测试网"K:VHK``0~
    Dim nowhr as Integer51Testing软件测试网"R Q*k#T(m
    Dim nowmin as Integer51Testing软件测试网|?)l.d{Y:Zmv
    dim x as string
a)q^\.x${3h'^0    dim nowmonth as integer51Testing软件测试网;gP"W2Oz}

3~ ]4L!~1b$nq0    Window SetContext, "Class=Shell_TrayWnd", ""
dBC_,i(Q0    nowhr=Hour(Now) 'Hour(time) 传回时间的小时字段,型态是Integer
'w t!Rp%J0A O 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软件测试网(i aii 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 then51Testing软件测试网[:M+`8S6_q TAk
       y="一" & "月"51Testing软件测试网p*^ri/{NE
     end if51Testing软件测试网3nI~SOK5h A&}j@
     msgbox y51Testing软件测试网:kQ5^#@kGdL
    ComboListBox Click, "ObjectIndex=1", "Text=" & y51Testing软件测试网r r;Y!D.f}
    PushButton Click, "Text=确定"
j$U~~r-o8b?;I]0End Sub51Testing软件测试网'gsSOv
51Testing软件测试网 by$A\O a$Q
待完善!!!51Testing软件测试网.j0]T bJA'`fP

TAG: Robot技术

 

评分:0

我来说两句

Open Toolbar