Item Required. A Variant value. The item to select from the list-view control. The item value
(with quotes) or numeric index (without quotes) can denote the item. The first item in a list-view
control is numbered 0.
State Required. An Integer value.
The object's state. The state can either be an index, or one of the following state constants:
micChecked (1)--Selects the item's check box
micUnchecked (0)--Clears the item's check box micClick (-1)--Clicks the state icon
micDblClick (-2)--Double-clicks state icon
可是我就是不知道我错在哪里,运行提示:Run Error:The operation cannot be performed
急求相救,不胜感激~~
运行有四个错误:
Property "selected" of item "7" has the actual value False. The expected value was True.
Property "state" of item "8" has the actual value 0. The expected value was 1.
然后将其取消选中"Display a notification about every script error",再print一遍,可以得出imageindex这个属性前后不一样,选中的时候imageindex为0,未选中为1,则:
If Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty("Browsing;Display a notification about every script error","imageindex") = 1 Then
Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").Select "Browsing;Display a notification about every script error"
End If
If Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").GetItemProperty("Browsing;Disable script debugging","imageindex") = 1 Then
Browser("Browser").Dialog("Internet Options").WinTreeView("Settings:").Select "Browsing;Disable script debugging"
End If