private static void ProcessInput(char input)
        {
            //Only append characters that exist in the spritefont.
            if (input == 13)
            {
                try
                {
                    var method = 
                        EngineGlobals.GenerateMethodFromString(
                        _variable.AsString.Replace(' ',';'));
                    method.ExecuteMethod(null);
                    ConsoleWindow.WriteLine("Executing...");
                }
                catch(EngineException ex)
                {
                    ConsoleWindow.WriteLine("Warning: {0}", ex.Message);
                }
                _variable.AsString = "";
                return;
            }

            if (input < 32 && input > 9)
                return;

            if (input > 126)
                return;

            if (input == 8)
            {
                if (_variable.AsString.Length > 0)
                    _variable.AsString = _variable.AsString.Substring(0, _variable.AsString.Length - 1);
            }
            else
                _variable += input;
        }
        public static void LoadScriptFromFile(out MethodParamCollection script, string fileName)
        {
            script = new MethodParamCollection();
            using (Utilities.FormattedFile file = new Utilities.FormattedFile())
            {
                file.ReadBegin(fileName);

                if (file.ReadBlock() == "Script")
                {
                    int count = -1;
                    count = int.Parse(file.ReadLine());

                    script._methods = new MethodParamPair[count];

                    for (int i = 0; i < count; i++)
                    {
                        MethodParamPair method;
                        string          methodName = file.ReadBlock();
                        int             paramNum   = int.Parse(file.ReadLine());
                        string[]        tempParams = new string[paramNum];
                        for (int j = 0; j < paramNum; j++)
                        {
                            tempParams[j] = file.ReadLine();
                        }
                        int      exitNum   = int.Parse(file.ReadLine());
                        string[] tempExits = new string[exitNum];
                        for (int j = 0; j < exitNum; j++)
                        {
                            tempExits[j] = file.ReadLine();
                        }
                        file.ReadEndBlock();
                        method = EngineGlobals.GenerateMethodFromArgs(methodName, tempParams, tempExits);
                        method.PostExecuteHandler += script.MethodExecuted;
                        script._methods[i]         = method;
                    }
                    file.ReadEndBlock();
                    file.ReadEnd();
                }
                else
                {
                    throw new EngineException("Could not load script " + fileName, false);
                }
            }
        }