不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           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
9QT,[-L\V0    Dim y as variant
)POy;U ]i/S _0    Dim msgtext as String51Testing软件测试网*}Tg.s"L
    Dim nowhr as Integer
9Ef$n7Yk^z(A2uH,p0    Dim nowmin as Integer
9vj7sm|S"`0    dim x as string51Testing软件测试网JF&jmAUJ#T
    dim nowmonth as integer51Testing软件测试网_.E)](l$I V ^ auX

/}8S2}bzq[5X D0    Window SetContext, "Class=Shell_TrayWnd", ""51Testing软件测试网 W:r |-_Fv s"f0t:{
    nowhr=Hour(Now) 'Hour(time) 传回时间的小时字段,型态是Integer
@1g G0u]\4hKkD0    nowmin=Minute(Now) 'Minute(time) 取得时间内容的分部分,型态为Integer。   
}RC*j\y _5| J0    y = "Text=" & Trim(str(nowhr))+":" & Trim(str(nowmin))     'Trim(string()) 去掉字符串开头和结尾的空白51Testing软件测试网A G La9w1}!l
    MsgBox y                                                          'Str(number) 将数字转为字符串后传回
mRk;M{h5O0v0    Window SetContext, "Class=Shell_TrayWnd", ""51Testing软件测试网\Je4J8K z x: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 then51Testing软件测试网5Oq i,jb%C,]mF
       y="一" & "月"
:i)mrs3I1g7HC0     end if
b,@1\YB.R0     msgbox y51Testing软件测试网 X8Wi8F] s#N$d5h$`C
    ComboListBox Click, "ObjectIndex=1", "Text=" & y51Testing软件测试网 z}S%a-\
    PushButton Click, "Text=确定"
3S%o/pu:vw/[!d0End Sub51Testing软件测试网+Cy;o8u6O M4U~
51Testing软件测试网Wwo ew9M
待完善!!!51Testing软件测试网$QY%?8g_v

TAG: Robot技术

 

评分:0

我来说两句

Open Toolbar