如何循环读取INI文件
For $i=1 To 100$path = IniRead(@ScriptDir & "\123.ini","DeployPic","Picture"&$i,"")
if $path ="" then
如果$path=""时,重新从picture1开始读取,如何实现
[ 本帖最后由 pchome2000 于 2008-12-24 16:15 编辑 ] Dim $path
While $path = ""
For $i = 1 To 100
$path = IniRead(@ScriptDir & "\123.ini", "DeployPic", "Picture" & $i, "")
Next
WEnd #include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Dim $path,$gui,$a
GUICreate("PIC",@DesktopWidth,@DesktopHeight,-1,-1)
GUISetState(@SW_SHOW)
While $path = ""
For $i = 1 To 100
$path = IniRead(@ScriptDir & "\123.ini", "DeployPic", "Picture" & $i, "")
GUICtrlDelete($a)
$a = GUICtrlCreatePic(@HomeDrive & "\" & $path, 0, 0,@DesktopWidth, @DesktopHeight)
Sleep(3000)
Next
WEnd不能循环读取INI文件,当INI文件只有10行时,读到第10行就从重新从第一行读取。 学习一下。 if $path = '' then
$i = 1
continueloop
endif
页:
[1]