3.2.13.7测试通过。
#include <GUIConstants.au3>
#include <GuiListView.au3>
Opt("TrayIconHide", 1)
GUICreate("程序", 350, 70, -1, -1)
$a = GUICtrlCreateButton("打印", 300, 10, 50, 50)
$List = GuiCtrlCreateListview("IC卡号|姓名|身份证号", 0, 0, 300, 70)
GuiCtrlCreateListViewItem("11111|aaa|bbbjhjhjhjhjhjh",$list)
GuiCtrlCreateListViewItem("2222|bbb|ddd",$list )
GuiCtrlCreateListViewItem("3333|bbb|ddd",$list )
GuiCtrlCreateListViewItem("4444|bbb|ddd",$list )
GuiCtrlCreateListViewItem("5555|bbb|ddd",$list )
_GUICtrlListView_SetItemSelected($List, 4)
GUISetState() ; display the GUI
Do
$msg = GUIGetMsg()
Select
Case $msg= $a
$dd="鼠标选中:"&_GUICtrlListView_GetItemText($List, Int(_GUICtrlListView_GetSelectedIndices($List)))
msgbox(0,"",_GUICtrlListView_GetSelectedCount($list))
MsgBox(0, "", $dd)
;exit
EndSelect
Until $msg = $GUI_EVENT_CLOSE
|