zoukankan      html  css  js  c++  java
  • AutoIt获取Gridview中可以修改列的值

    有一个界面如上图:黑色框框部分是一个整体,也是一个gridview,如果我想把框框中右侧数据获取出来,该如何操作?

    我尝试过了很多途径,都无法成功。

    今天,我发现,当鼠标焦点在黑色框框左侧的部分的时候,该焦点右侧的内容可以通过ControlGetText获得,于是我就有办法获取该gridview中右侧所有的内容了。方法如下:

    opt("WinTitleMatchMode")
    $handle = WinGetHandle(".NET Reactor v4.5.9.8 - Full Versio")
    WinActivate($handle)
    dim $arrayx[6] = [10, 30, 40, 60, 80, 90]
    ;for $i = 0 to UBound($arrayx)-1
    ;    ControlClick($handle,"","WindowsForms10.Window.8.app.0.1f550a4_r15_ad129","left", 1,100, $arrayx[$i])
    ;    ConsoleWrite(ControlGetText($handle,"","WindowsForms10.EDIT.app.0.1f550a4_r15_ad11") & @LF)
    ;Next
    
    for $i in $arrayx
        ControlClick($handle,"","WindowsForms10.Window.8.app.0.1f550a4_r15_ad129","left", 1,100, $i)
        ConsoleWrite(ControlGetText($handle,"","WindowsForms10.EDIT.app.0.1f550a4_r15_ad11") & @LF)
    Next

    该方法会遍历点击黑色框框内部左侧所有的label,获取焦点,然后把该label对应的右侧的内容获取出来。

    遗憾的是,我目前还不清楚,如何根据文本的内容进行点击操作。

  • 相关阅读:
    HDU 1000 A + B Problem
    HDU 3635 Dragon Balls
    HDU 3461 Code Lock
    HDU 1856 More is better
    HDU 1198 Farm Irrigation
    HDU 1325 Is It A Tree?
    HDU 1001 Sum Problem
    HDU 1829 A Bug's Life
    HDU 2610 Sequence one
    HDU 3350 #define is unsafe
  • 原文地址:https://www.cnblogs.com/autotest/p/3272340.html
Copyright © 2011-2022 走看看