I am making an application to change the the resolution of that game, to the requested resolution.
StreamReader reader = new StreamReader(@"C:\Documents and Settings\ARTech\Bureaublad\PersistentSymbols.ini");//Reads the file.
string content = reader.ReadToEnd();//Puts the content of the file, into a variable.
reader.Close();
string replace = "persistent extern INDEX m_pixScreenWidth=(INDEX)" + txtWidth.Text + ";";
content = content.Replace("persistent extern INDEX m_pixScreenWidth=(INDEX)1920;", replace);//Replaces the ScreenWidth of the game to the requested number.
replace = "persistent extern INDEX m_pixScreenHeight=(INDEX)" + txtHeight.Text + ";";
content = content.Replace("persistent extern INDEX m_pixScreenHeight=(INDEX)1200;", replace);//Replaces the ScreenHeight of the game to the requested number.
StreamWriter writer = new StreamWriter(@"C:\Documents and Settings\ARTech\Bureaublad\PersistentSymbols.ini");
writer.Write(content);//Saves the changes.
writer.Close();
The problem is, that the resolution is not always 1920 x 1200, so I need some kind of wildcard which accepts everything between "persistent extern INDEX m_pixScreenWidth=(INDEX)" and ";".
Ivar