KJohn Posted July 10, 2009 Share Posted July 10, 2009 You can get BrainPain here at:http://www.autoitscript.com/forum/index.php?app=downloads&showfile=105Run the following code from the same folder containing BrainPain.au3 and all the source files will be updated so that it works.Many thanks to mrbond007 for the excellent game!expandcollapse popup#NoTrayIcon If Not FileExists ("BrainPain.au3") Then MsgBox(0,"BrainPain Fixer Error","Please place this file in the same folder as BrainPain.au3.") EndIf $find = FileFindFirstFile ("Games\*.au3") While 1 $file = FileFindNextFile($find) If @error Then ExitLoop FileMove ("Games\" &$file, "Games\" &$file &".tmp") $read = FileOpen ("Games\" &$file &".tmp",0) $write = FileOpen ("Games\" &$file,2) While 1 $line = FileReadLine($read) If @error Then ExitLoop FileWriteLine($write,$line) If $line <> "#include <GUIConstants.au3>" Then ContinueLoop FileWriteLine ($write,"#include <WindowsConstants.au3>"&@CRLF&"#include <EditConstants.au3>"&@CRLF&"#include <StaticConstants.au3>") WEnd FileClose($read) FileClose($write) FileDelete("Games\" &$file &".tmp") WEnd $file = "BrainPain.au3" FileMove ($file, $file &".tmp") $read = FileOpen ($file &".tmp",0) $write = FileOpen ($file,2) While 1 $line = FileReadLine($read) If @error Then ExitLoop FileWriteLine($write,$line) If $line <> "#include <GUIConstants.au3>" Then ContinueLoop FileWriteLine ($write,"#include <WindowsConstants.au3>"&@CRLF&"#include <EditConstants.au3>"&@CRLF&"#include <StaticConstants.au3>") WEnd FileClose($read) FileClose($write) FileDelete($file &".tmp") MsgBox(0,"BrainPain Fixer","The BrainPain source code has been updated to work with the latest version of AutoIt as of 11th July 2009.") MsgBox(0,"Shameless Plug","Get DiskMax and neoSearch at koshyjohn.com. Well you got free code didn't you? Reading one line won't hurt.") Link to comment Share on other sites More sharing options...
KJohn Posted July 10, 2009 Author Share Posted July 10, 2009 Actually, if one of the mods just used this to update the code, rezip it and replace the file in the downloads section, people downloading that program will not get frustrated (there are 126 files to update!). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now