Global $inipath = @ScriptDir & "\config.ini"
If @error Then
MsgBox(4096, "", "发生错误,可能目标文件并非标准的INI文件.")
Exit
Local $HostName
$HostName = StringSplit(IniRead($inipath, "配置信息", "机器列表", ""), ",")
If @ComputerName=$HostName
Global $inipath = @ScriptDir & "\config.ini"
If Not FileExists($inipath) Then
MsgBox(4096, "", "发生错误,可能目标文件不存在")
Exit
EndIf
Local $HostName
$HostName = StringSplit(IniRead($inipath, "配置信息", "机器列表", ""), ",")
for $i=0 to ubound($HostName)-1
If @ComputerName=$HostName[$i]
;执行相应操作
EndIf
Next
Global $inipath = @ScriptDir & "\config.ini"
If Not FileExists($inipath) Then
MsgBox(4096, "", "发生错误,可能目标文件不存在")
Exit
EndIf
Local $HostName
$HostName = StringSplit(IniRead($inipath, "配置信息", "机器列表", ""), ",")
for $i=0 to ubound($HostName)-1
If @ComputerName=$HostName[$i] Then
Run("Notepad.exe", "", @SW_MAXIMIZE)
EndIf
Next 搞定
#include <array.au3>
Global $inipath = @ScriptDir & "\config.ini"
If Not FileExists($inipath) Then
MsgBox(4096, "", "发生错误,可能目标文件不存在")
Exit
EndIf
Local $HostName
$HostName = StringSplit(IniRead($inipath, "配置信息", "机器列表", ""), ",")
if @error then MsgBox(0,"温馨小提示","读取机器列表失败")
for $i = 1 to $HostName[0]
If @ComputerName = $HostName[$i] then
;;;这里填写你要执行的内容
EndIf
Next