private int LoadScripts(ICollection<string> scriptFileList) { int done = 0, loaded = 0; foreach (string scriptPath in scriptFileList) { try { if (this.LoadScript(scriptPath)) loaded++; } catch (FileNotFoundException) { Log.Warning("Script not found: {0}", scriptPath); continue; } if (done % 5 == 0) Log.Progress(done + 1, scriptFileList.Count); done++; } Log.Progress(100, 100); return loaded; }