Robot 为什么不支持for each .... next
‘通过进程名终止进程dim strComputer as string
dim objWMIService as object
dim colProcessList as object
dim objProcess as object
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'Notepad.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
编译时提示For语句错误,是不是Robot 2003不支持For each.......next?
该如何解决?
页:
[1]