2
votes

i read a config.ini with a location of some .exe to run, but i want to skip a comment line from my config.ini (cause i want to explain how to use the file), if someone can help me thanks

#NoEnv
#SingleInstance force
Loop
    {
    FileReadLine, exe, config.ini, %A_Index%
            if ErrorLevel 
            break
    Run %exe%
    Sleep , 300
    }
return
ExitApp

config.ini

// Put here location of your programs << line to skip
// Thanks << line to skip
C:\WINDOWS\notepad.exe
C:\WINDOWS\****.exe
...
1

1 Answers

1
votes
Loop
    {
    FileReadLine, exe, config.ini, %A_Index%
            if ErrorLevel 
            break
            else if SubStr(exe,1,2)=="//"
            continue
    Run %exe%
    Sleep , 300
    }

Using SubStr() check if first two chars in line are // if so use continue to skip rest of loop and start next iteration.