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

     

  • 相关阅读:
    JavaScript 焦点事件
    在虚拟机里面运行java程序
    CentOS 7 命令
    修改和删除
    查询语句,查询指定的字段,带条件查询,排序查询
    Redis系列之-缓存的使用和优化
    Redis系列之-Redis-Sentinel
    Redis系列之主从复制原理与优化
    Redis系列之-使用常见问题
    Redis系列之-持久化
  • 原文地址:https://www.cnblogs.com/zhangjun1130/p/1782386.html
Copyright © 2011-2022 走看看