本帖最后由 wisly 于 2009-10-26 14:01 编辑
搞不来啊,怎么才能让贴上去的code保持语法高亮和缩进格式啊?#NoTrayIcon
#include <File.au3>
#include <Array.au3>
Global $File = 'c:\' & @ComputerName & '.txt'
_Proc2File($File)
Func _Proc2File($filename)
Local $aProcList = ProcessList()
Dim $aNameList[$aProcList[0][0] + 1]
$aNameList[0] = $aProcList[0][0]
For $i = 1 to $aNameList[0]
$aNameList[$i] = $aProcList[$i][0]
Next
Dim $aOProcList
If Not _FileReadToArray($filename, $aOProcList) Then
$aOProcList = $aNameList
Else
_ArrayConcatenate($aOProcList, $aNameList)
EndIf
$aOProcList = _ArrayUnique($aOProcList)
_ArrayDelete($aOProcList,@ScriptName)
_FileWriteFromArray($filename, $aOProcList, 1)
EndFunc ;==>_Proc2File
|