local fh = file.open(arg(1), "r") local hwnd = win.handle("c=TTOTAL_CMD") local Counter, Str, i, Result, Class, Path, Name local Where = "default - Instead" if(fh > 0) do for(not(file.eof(fh))) Str = file.readstring(fh) if(Str) Counter++ endfor else messagebox("ok error", "File not opened", "FILE plugin error #1") quit endif if(Counter == 1) do win.postmessage(hwnd, 0x400+51, 2700, 0) file.close(fh) quit endif @CommentString Str = "" Result = Inputdialog("~Str=Comment string, Where=Location of new string relative to old one??Before|After|Instead", "Edit descriptions for " ++ Counter ++ " files") if(not Result) do file.close(fh) quit endif if(not Str) do Result = "Comment string is not specified. Would you like to delete old comments?" Result = messagebox("yesnocancel question", Result, "'EditFileComments' script") if(Result == 7) do jump CommentString elseif(Result == 0) do file.close(fh) quit endif endif file.restart(fh) for(i = 1; i <= Counter; i++) Class = file.readstring(fh) Path = file.folder(Class) ++ "\" Name = file.nametype(Class) if(Result == 6) do Class = "d" else if(Where == "default - Instead" || Where == "Instead") do Class = "s" elseif(Where == "Before") do Class = "b" elseif(Where == "After") do Class = "a" endif endif runfile.Subs\Sub_Descript_ion(Path, Name, Str, Class) endfor file.close(fh)