回复 4# afan
hi 还有个问题,我如果做自定义函数就报错。
脚本#include <_Ini.au3>
$idSQLLJ ='D:\au3\idSQL.ini'
$eerr = far($idSQLLJ)
MsgBox(0,"",$eerr)
Func far($idSQLLJ)
#include <_Ini.au3>
#include <Date.au3>
Local $var = _IniReadSection($idSQLLJ, 'SQL'), $i, $x, $xN
If @error Then
Exit -1
EndIf
$x = $var[1][1]
$t = _NowCalc()
For $i = 2 To $var[0][0]
$iDateCalc = _DateDiff('s', $x, $t)
$iDateCalc2 = _DateDiff('s', $var[$i][1], $t)
If $iDateCalc2 > $iDateCalc Then
$x = $var[$i][1]
$xN = $var[$i][0]
EndIf
Next
Return $xN
;~ MsgBox(0, $xN, $x)
EndFunc
错误[主体]计算idSQL中距现最长的时间.au3(35,10) : WARNING: already included file: D:\au3\AUTOIT_3.3.6.1PRE\Include\_Ini.au3
#include <_Ini.au3>
~~~~~~~~~^
D:\au3\AUTOIT_3.3.6.1PRE\Include\_Ini.au3(47,1) : 错误: 表达式错误
Func
^
D:\au3\进行\第四次导出\实验室\时间优先级判定\[主体]计算idSQL中距现最长的时间.au3 - 1 error(s), 1 warning(s)
$var[$i][1]
$xN = $var[$i][0]
EndIf
Next
Return $xN
;~
|