一个傻瓜的做法:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>
GUICreate("ControlPanel", 220, 220, 100, 200)
$listview = GUICtrlCreateListView("col1", 10, 10, 200, 150)
GUICtrlSetStyle(-1,$LVS_ICON)
$button = GUICtrlCreateButton("选中什么了?", 75, 170, 80, 20)
$item1 = GUICtrlCreateListViewItem( "辅助功能选项", $listview)
GUICtrlSetImage (-1, @SystemDir&"\Access.cpl",-1)
$item2 = GUICtrlCreateListViewItem( "添加/删除程序", $listview)
GUICtrlSetImage (-1, @SystemDir&"\appwiz.cpl",-1)
GUISetState()
Do
$msg = GUIGetMsg()
Select
Case $msg = $button
MsgBox(0, "listview item", StringTrimRight(GUICtrlRead(GUICtrlRead($listview)),1), 2)
EndSelect
Until $msg = $GUI_EVENT_CLOSE
更好的(也是更简单的)
创建一个窗口,内嵌一个ie,把ie导航到::{21EC2020-3AEA-1069-A2DD-08002B30309D}(即控制面板) |