set the_list to ""
set nl to ASCII character 10
tell application "Finder"
set file_list to name of every file of folder "Macintosh HD:users:dominus:documents:dosbox" whose name ends with ".conf"
repeat with entry in file_list
set the_list to the_list & nl & entry
end repeat
end tell
set optionen to (choose from list file_list with prompt "DOSBox plays today")
if optionen is not false then
do shell script "/Users/dominus/Code/cvs/dosbox/src/dosbox -conf /users/dominus/documents/dosbox/" & optionen as string & " &> /dev/null &"
else if optionen is false then
do shell script "/Users/dominus/Code/cvs/dosbox/src/dosbox &> /dev/null &"
end if
What it does:
It displays all my config files for DOSBox stored in ~/documents/dosbox, when I choose one, it will start DOSBox with the parameter “-conf /users/dominus/documents/dosbox/name of the configfile”. Or if I don’t choose one, it will start DOSBox without a config file. All of this works.
What doesn’t work is the redirect to /dev/null when choosing a config file. AppleScript-Runner will not shut down until I close DOSBox.
“do shell script “/Users/dominus/Code/cvs/dosbox/src/dosbox &> /dev/null &”” does work, otoh…
I’m really stumped atm, and have no idea how to proceed…
P.S.: Sorry for the undescriptive subject, I couldn’t think of a good one…