获得NOTEPAD++ Download Manager的所有下载列表的内容的au3脚本

;~ 获得NOTEPAD++ Download Manager的所有下载列表的内容的au3脚本
;~ 作者: 鹏程万里
;~ Email:aprial@163.com
;~ 创建日期: 2014年11月9日 23:02:50

#include <GuiListView.au3>
#include "E:\01.prj\setting\autoit\UserInclude\dbg.au3"
$hwnd = WinWait("Plugin Manager", "Settings", 3)
if $hwnd = null Then
    MsgBox(1, '', "Invalid hwnd")
    Exit
EndIf

WinActivate($hwnd)

$hwnd_control = ControlGetHandle ($hwnd, "", "[CLASS:SysListView32; INSTANCE:1]")
$hwnd_edit_control = ControlGetHandle ($hwnd, "", "[CLASS:Edit; INSTANCE:1]")
d($hwnd)
d($hwnd_control)
d($hwnd_edit_control)
$nColumnCount = _GUICtrlListView_GetColumnCount($hwnd_control)
$itemCount = _GUICtrlListView_GetItemCount($hwnd_control)

d($nColumnCount)
d($itemCount)
$s = '<table>' & @CRLF
$d = ''
ControlClick($hwnd, '', $hwnd_control)
Sleep(200)
Send("^{HOME}")
Sleep(200)
Send("{SPACE}")
Sleep(200)

for $row = 0 to $itemCount
    $s = $s & "<tr>" & @CRLF
    for $col = 0 to $nColumnCount
        $s = $s & "<td>" & _GUICtrlListView_GetItemText($hwnd_control, $row, $col) & "</td>"
    next
    $s = $s & "<td>" & ControlGetText($hwnd, '', $hwnd_edit_control) & "</td>"
    $s = $s & "</tr>" & @CRLF
    Send("{DOWN}")
next
$s = $s & @CRLF '</table>' & @CRLF

d($s)
;~ fs("e:\a.html", $s)

posted @ 2014-11-09 23:10  aprial  阅读(211)  评论(0编辑  收藏  举报