zoukankan      html  css  js  c++  java
  • QTP中的一段VBS (扩展)

    稍后黏贴过来

     


    Window("测试版").WinMenu("Menu").Select "水印检测;文件夹"
    Dialog("浏览文件夹").WinTreeView("请选择数据所在文件夹").Expand "桌面;我的电脑;综合影像库 (F:)"
    Dialog("浏览文件夹").WinTreeView("请选择数据所在文件夹").Expand "桌面;我的电脑;综合影像库 (F:);Software"
    Dialog("浏览文件夹").WinTreeView("请选择数据所在文件夹").Expand "桌面;我的电脑;综合影像库 (F:);Software;测试"
    Dialog("浏览文件夹").WinTreeView("请选择数据所在文件夹").Expand "桌面;我的电脑;综合影像库 (F:);Software;测试;天下图水印软件测试4"
    Dialog("浏览文件夹").WinTreeView("请选择数据所在文件夹").Expand "桌面;我的电脑;综合影像库 (F:);Software;测试;天下图水印软件测试4;加水印_厦门原始影像 COPY10"
    Dialog("浏览文件夹").WinTreeView("请选择数据所在文件夹").Expand "桌面;我的电脑;综合影像库 (F:);Software;测试;天下图水印软件测试4;加水印_厦门原始影像 COPY10;xiexie"
    Dialog("浏览文件夹").WinTreeView("请选择数据所在文件夹").Select "桌面;我的电脑;综合影像库 (F:);Software;测试;天下图水印软件测试4;加水印_厦门原始影像 COPY10;xiexie;厦门原始影像 COPY10"
    Dialog("浏览文件夹").WinButton("确定").Click

    Dim startHour
    startHour= Hour(now)
    Dim startMinute
    startMinute= Minute(now)
    Dim startSecond
    startSecond= Second(now)

    do While true
    If  Window("测试版").Dialog("ImageWaterMark").Exist=true Then
    exit do
    End If
    loop
    'wait  1320 很好的一段程序

    Window("测试版").Dialog("ImageWaterMark").WinButton("确定").Click
    Dim endHour
    endHour= Hour(now)
    Dim endMinute
    endMinute= Minute(now)
    Dim endtSecond
    endSecond= Second(now)


    Const ForAppending = 8   
     Dim fs, f,a
    a =startHour&":"&startMinute&":"&startSecond & vbTab &endHour&":"&endMinute&":"&endSecond& vbTab & (endHour*3600+endMinute*60+endSecond)-(startHour*3600+startMinute*60+startSecond) &vbcrlf   
     'a =startHour&":"&startMinute&":"&startSecond &vbTab&endHour&":"&endMinute&":"&endSecond& vbTab &
    '(endHour*3600+endMinute*60+endSecond)-(startHour*3600+startMinute*60+startSecond) &vbcrlf                          
                          
    '创建ActiveX对象,然后打开文件,再写入字符串,最后关闭
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.OpenTextFile("c:\batch_water_marker_test.txt", ForAppending,True)
    f.Write a
    f.Close

    Window("测试版").Dialog("批量检测结果").WinButton("关闭").Click
    Window("测试版").Close

     

  • 相关阅读:
    centos7 安装中文编码
    docker一些命令
    bash: ifconfig: command not found
    sublime3的licence(update 2016-04-14)
    Mac下更改python版本为3.5
    BigDecimal的equals
    cvc-elt.1: 找不到元素 'beans' 的声明
    Configuration problem: Only one AsyncAnnotationBeanPostProcessor may exist within the context.
    You need tcl 8.5 or newer in order to run the Redis test
    自定义的类型转换器中怎样自定义错误消息?(待解答)
  • 原文地址:https://www.cnblogs.com/zhangjun1130/p/1782386.html
Copyright © 2011-2022 走看看