不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。                                           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
\Ja8`}F+`)LP0    Dim y as variant
s2Wo;b(M s,G3ML0    Dim msgtext as String51Testing软件测试网OAO#k{"|
    Dim nowhr as Integer51Testing软件测试网x0aw TIS
    Dim nowmin as Integer51Testing软件测试网 hS"[I|/y
    dim x as string51Testing软件测试网(} ti'[YJ
    dim nowmonth as integer51Testing软件测试网A YS P2b:]m

~7I$f B}%h9q0    Window SetContext, "Class=Shell_TrayWnd", ""51Testing软件测试网b iBG+?v}g
    nowhr=Hour(Now) 'Hour(time) 传回时间的小时字段,型态是Integer
Q4X"|m:tz]}:wq0    nowmin=Minute(Now) 'Minute(time) 取得时间内容的分部分,型态为Integer。   51Testing软件测试网.y g!L*s4\_KD
    y = "Text=" & Trim(str(nowhr))+":" & Trim(str(nowmin))     'Trim(string()) 去掉字符串开头和结尾的空白
6ML4_ W]"{:w Z0    MsgBox y                                                          'Str(number) 将数字转为字符串后传回51Testing软件测试网/@2a6yH_ n{6jd t
    Window SetContext, "Class=Shell_TrayWnd", ""
L5\/Yc/kjj nMkV0    GenericObject DblClick, y, "Coords=31,15"
K!|6~]u.|t6s,^0    rem Window SetContext, "Caption=日期和时间 属性", ""51Testing软件测试网2`"G&o.xbx
    Window SetTestContext, "Caption=日期和时间 属性", ""
}3mO;u ]8TLf^6N/rm0    ComboBox Click, "ObjectIndex=1", "Coords=66,5"51Testing软件测试网/z~v3I/G
    nowmonth=Month(now)   'Month(date) 取得日期的月部分,型态为Integer
o6LaMY.`|hK0    y=trim(str(nowmonth))
eN3v%D _kP h0    msgbox y 51Testing软件测试网T9@o} MQ`,r
    if y=1 then
Y4|S dH _h2~2y0       y="一" & "月"
F%h%GoFJ.` d9~d0     end if51Testing软件测试网{T(l*Ug9w-y s
     msgbox y
+Zq#D;Om@0    ComboListBox Click, "ObjectIndex=1", "Text=" & y51Testing软件测试网BxKHX
    PushButton Click, "Text=确定"51Testing软件测试网4`!GWg X#R
End Sub51Testing软件测试网?K%`5Y EE;M

o)C2iUy0待完善!!!51Testing软件测试网|-G1]@0b,Y0V GKLz

TAG: Robot技术

 

评分:0

我来说两句

Open Toolbar