Error: Type mismatch
Specifically: _Enum
Code: Select all
for k, v in {A : 1, B : 2}
{
MsgBox k ":" v
}
Error: Type mismatch
Specifically: _Enum
Code: Select all
for k, v in {A : 1, B : 2}
{
MsgBox k ":" v
}
Code: Select all
for k, v in {A : 1, B : 2}.OwnProps()
{
MsgBox k ":" v
}
Code: Select all
; throws error
Gui := GuiCreate(, "Process List")
LV := Gui.Add("ListView", "x2 y0 w400 h500", "Process Name|Command Line")
for process in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process")
LV.Add("", process.Name, process.CommandLine)
Gui.Show
Code: Select all
; works
Gui := GuiCreate(, "Process List")
LV := Gui.Add("ListView", "x2 y0 w400 h500", "Process Name|Command Line")
for process in ComObjGet("winmgmts:").ExecQuery("Select * from Win32_Process")._NewEnum()
LV.Add("", process.Name, process.CommandLine)
Gui.Show
My bad. I will endeavour to do better in the future. Thank you.lexikos wrote: ↑19 Aug 2019, 03:43This is a separate issue. Given that you have posted about it in a topic which was already marked as solved, I could have easily missed it.
ComObjects translate __Enum to _NewEnum. The problem is that __Enum accepts a parameter, while _NewEnum does not (although it is possible that some COM objects will ignore it). It will be fixed.