Howard AutoIt can read from text files with no problem...tho I tend to use INI files. Any ways here is an old ZiNc wrapper that shows the basic reading from an INI file, and the reading of an INI thats been passed via commandline.
#include <process.au3>
; Read ROM Pathing
$roms = IniRead( @ScriptDir & "\settings.ini", "ROMS", "PATH", @ScriptDir & "\ROMS\" )
; Read Game Related Settings
$ini_01 = IniRead( $CmdLine[1] , "GAM" , "Number" , "1" )
$ini_02 = IniRead( $CmdLine[1] , "CFG" , "Config" , "./Zinc.cfg" )
$ini_03 = IniRead( $CmdLine[1] , "CFG" , "Renderer" , "./renderer.cfg" )
$ini_04 = IniRead( $CmdLine[1] , "CFG" , "Controller" , "./controller.cfg" )
$ini_05 = IniRead( $CmdLine[1] , "GFX" , "Rotate" , "0" )
$ini_06 = IniRead( $CmdLine[1] , "GFX" , "Geometry" , "yes" )
$ini_07 = IniRead( $CmdLine[1] , "PLG" , "Controller" , "./controller.znc" )
$ini_08 = IniRead( $CmdLine[1] , "PLG" , "Renderer" , "./renderer.znc" )
$ini_09 = IniRead( $CmdLine[1] , "SND" , "Use" , "yes" )
$ini_10 = IniRead( $CmdLine[1] , "SND" , "Filter-Enable" , "yes" )
$ini_11 = IniRead( $CmdLine[1] , "SND" , "Filter-CutOff" , "44100" )
$ini_12 = IniRead( $CmdLine[1] , "SND" , "Lite-Enable" , "yes" )
$ini_13 = IniRead( $CmdLine[1] , "SND" , "Lite-Multiplier" , "40" )
$ini_14 = IniRead( $CmdLine[1] , "SND" , "Stereo-Exciter" , "yes" )
; Kill Emulator
Func end_session ()
ProcessClose( "ZiNc.exe" )
Exit
EndFunc
$game = @ScriptDir & '\ZiNc.exe ' & $ini_01 & _
' --roms-directory=' & $roms & _
' --controller=' & $ini_07 & _
' --renderer=' & $ini_08 & _
' --use-config-file=' & $ini_02 & _
' --use-renderer-cfg-file=' & $ini_03 & _
' --use-controller-cfg-file=' & $ini_04 & _
' --rotate=' & $ini_05 & _
' --use-slow-geometry=' & $ini_06 & _
' --use-sound=' & $ini_09 & _
' --sound-filter-enable=' & $ini_10 & _
' --sound-filter-cutoff=' & $ini_11 & _
' --sound-surround-lite-enable=' & $ini_12 & _
' --sound-surround-lite-multiplier=' & $ini_13 & _
' --sound-stereo-exciter=' & $ini_14
; Define Kill Key
HotKeySet( "{BACKSPACE}" , "end_session" )
; Launch Emulator
_RunDos ( $game )
; Time just keeps on slipping into the future :)
While 1
If ProcessExists ( 'ZiNc.exe' ) = 0 Then Exit
Sleep ( 500 )
WEnd
; EOF