Ambrosia Garden Archive
    • Multi-button mouse support

      4 12 1981

      If you want to use Darwinia with a multi-button mouse, download this fix. It modifies your preferences file to make using a multi-button mouse for Darwinia easier.

    • Why must you download something? Why can't you just modify your prefs file yourself, as is described in another topic?

    • Agent_Vast, on Apr 3 2005, 12:54 AM, said:

      If you want to use Darwinia with a multi-button mouse, download this fix. It modifies your preferences file to make using a multi-button mouse for Darwinia easier.
      View Post

      When using Panther's built-in ZIP support to open the file, it doesn't work. Some file info is lost or something. Stuffit Expander does it ok.

    • I highly recommend you do NOT use this program, as it does not function correctly and could damage your darwinia preferences file.

      When I tested running it, it appended a modified version of my preferences file's contents to my preferences file, causing multiple listings of each option. This could potentially cause problems with Darwinia. It is much safer just to edit the one line yourself as detailed here: http://www.ambrosias...showtopic=93885

    • OK, I can see the problem in the code - updates coming soon.

      EDIT: The problem has been fixed.

      This post has been edited by Agent_Vast : 03 April 2005 - 01:20 PM

    • I looked and found it had messed up my prefs too. Please make it clear that your script is unofficial. Thanks,

      Michael B

    • It's still causing duplication of the preferences file data.

    • Anyone here an Applescript genius?

    • Agent_Vast, on Apr 3 2005, 07:29 PM, said:

      Anyone here an Applescript genius?
      View Post

      Why don't you make an editable version available, or paste the code in here, so someone might see what's wrong?

      Can we assume that your script is just supposed to change the one option mentioned in another thread? I reckon I could make a shell script to do that... 🙂 will give it a go anyhow.

      Edit: or not... why are manpages so unhelpful?!:p

      This post has been edited by Michael B : 03 April 2005 - 02:15 PM

    • Ok, here's a shell script version. Save it to your disk and call it as sh darwinia_fix.sh to run it. Call it as sh darwinia_fix.sh -h for help in using it.

      Note: the file is zipped because this board apparently doesn't let you upload files with the .sh extension. Strange.

      Attached File(s)

    • on searchReplace(origStr, searchStr, replaceStr)
      	set old_delim to AppleScript's text item delimiters
      	set AppleScript's text item delimiters to searchStr
      	set origStr to text items of origStr
      	set AppleScript's text item delimiters to replaceStr
      	set origStr to origStr as string
      	set AppleScript's text item delimiters to old_delim
      	return origStr
      end searchReplace
      
      tell application "Finder"
      	set short_name to do shell script ("id -un")
      	set theFile to file "preferences.txt" of folder "full" of folder "Darwinia" of folder "Application Support" of folder "Library" of folder short_name of folder "Users" of startup disk as alias
      	set prefs_file to open for access theFile with write permission
      	set prefs_content to read prefs_file
      	set prefs_content to my searchReplace(prefs_content, "ControlMouseButtons = 1", "ControlMouseButtons = 2")
      	set eof prefs_file to 0
      	write prefs_content to prefs_file
      	close access prefs_file
      end tell