Du brauchst _GUICtrlListView_SetItemChecked dafür. Hier hast du ein Beispielscript wie du das ganze auf fremden GUIs machen kannst. (Ist aber ziemlich schlampig geschrieben!)
AutoIt
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <GUIListView.au3>
$Form1 = GUICreate("Form1", 427, 182, 192, 124)
$ListView1 = GUICtrlCreateListView("||", 16, 16, 250, 150, -1, BitOR($WS_EX_CLIENTEDGE,$LVS_EX_CHECKBOXES))
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 50)
$ListView1_0 = GUICtrlCreateListViewItem("1", $ListView1)
$ListView1_1 = GUICtrlCreateListViewItem("22", $ListView1)
$ListView1_2 = GUICtrlCreateListViewItem("333", $ListView1)
$ListView1_3 = GUICtrlCreateListViewItem("444", $ListView1)
$Button1 = GUICtrlCreateButton("Button1", 296, 56, 97, 49)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$hListView = ControlGetHandle("Form1", "", "[CLASS:SysListView32; INSTANCE:1]")
_GUICtrlListView_SetItemChecked($hListView, 0)
_GUICtrlListView_SetItemChecked($hListView, 2)
EndSwitch
WEnd
Alles anzeigen
Richtig wäre:
$chk = ControlCommand("Red Giant Software Registration", "", 1, "isChecked")
Richtig wäre eher wenn die bei der Control ID keine 1 steht, sondern das hier [CLASS:SysListView32; INSTANCE:1].