• 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

     

  • 相关阅读:
    安装Visual_Studio的艰辛历程
    桶排序和直接排序的算法和数据结构
    链式队列的c++代码和原理以及编译分析
    C# 利用xmlhttp根据网址调用接口获取数据
    使用 LINQ To SQL 和实体框架实现灵活的数据访问
    K51的安装包和ET199的开发包和示例
    The model item passed into the dictionary is of type 'System.Collections.Generic.List`1[BMS.DataAccess.Models.ServiceTyp
    VS2008中文版中安装 silverlight 3 英文版
    让Windows Server 2008+IIS 7+ASP.NET支持10万个同时请求(转)
    在windows2003+IIS6部署dot net的MVC项目
  • 原文地址:https://www.cnblogs.com/zhangjun1130/p/1782386.html
Copyright © 2020-2023  润新知