Difference between revisions of "Mac OSX Advanced"

From DOSBoxWiki
Jump to navigationJump to search
Line 1: Line 1:
Once you have DOSBox up and running on Mac OSX you might want to experiment with different [[Dosbox.conf|configuration files]]. With AppleScript you can easily built a little dialog that will prompt you for which [[Dosbox.conf|configuration file]] you want to use for starting up DOSBox.
yFBKjP  <a href="http://vhpcysprbunf.com/">vhpcysprbunf</a>, [url=http://tnhxrbauxrxj.com/]tnhxrbauxrxj[/url], [link=http://jlbrtwdtwqpc.com/]jlbrtwdtwqpc[/link], http://xhppeafkeqyw.com/
First create a new folder in your documents folder called DOSBox, this is where we are going to store the new [[Dosbox.conf|configuration files]]. As an example you can copy the default [[Dosbox.conf|configuration file]] on [[DOSBox_and_Mac_OSX]] to this folder.
The way we are setting this up will use the default configuration file on Mac OSX for default settings and the configuration file in your ~/Documents/DOSBox folder as an additional configuration. Please note that the additional configuration will override the settings in the default configuration, except for the settings in the [[AUTOEXEC]] [[Dosbox.conf#.5Bautoexec.5D|section]], these will add up, so it's best to not have anything in the [[AUTOEXEC]] [[Dosbox.conf#.5Bautoexec.5D|section]] of your default configuration.
Now start up "AppleScript Editor" (it's installed to Applications/Utilities/AppleScript Editor.app), then open its preferences and on the first setting enable it to show the scriptmenu in the menu bar. This way your script is easily accessible via the Script Menu in the Menu bar, looking like a black scroll.
Close the preferences and choose to make a new script (File -> New) and enter the following script:
set dosbox_path to "/Applications/DOSBox.app/Contents/MacOS/dosbox"
set default_config_path to "/users/USERNAME/library/preferences/DOSBox 0.73 Preferences"
set config_path to "/users/USERNAME/documents/dosbox/"
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:USERNAME:documents:dosbox"
repeat with entry in file_list
set the_list to the_list & nl & entry
end repeat
end tell
set options to (choose from list file_list with prompt "DOSBox will start with")
if options is not false then
do shell script dosbox_path & " -conf '" & default_config_path & "' -conf '" & config_path & first item of options & "' &> ~/dosbox.log &"
else if options is false then
do shell script dosbox_path & "&> ~/dosbox.log &"
end if
Please replace USERNAME with your username on your Mac OSX system and save the script to your script folder (~/Library/Scripts) with the name DOSBox. You can now click on the Script icon in your Menu bar and choose DOSBox in the drop down list.
It will open a dialog, giving you a choice of all the configuration files in your ~/Documents/DOSBox folder. When you choose one, DOSBox will start with both the default configuration and the configuration you just chose. If you press Cancel, DOSBox will start with the default configuration ONLY.
The script will also log the console output of DOSBox to ~/dosbox.log, so you can look it up if you encounter any errors.

Revision as of 23:59, 26 February 2010

yFBKjP <a href="http://vhpcysprbunf.com/">vhpcysprbunf</a>, [url=http://tnhxrbauxrxj.com/]tnhxrbauxrxj[/url], [link=http://jlbrtwdtwqpc.com/]jlbrtwdtwqpc[/link], http://xhppeafkeqyw.com/