You are not logged in.
I'm new to pascal, not coding.
I wish to be asked the season and starting episode number. then use this to create "Mork and Mindy_S01E03" for example and each sequential file based on file date is incremented ("Mork and Mindy_S01E04","Mork and Mindy_S01E05"
Looks pretty straight forward, however, the following is not working.
What am I doing wrong?
var
Initialized : Boolean;
Season : String;
EStart : String;
E : Integer;
procedure Initialize;
begin
Initialized := True;
InputBox('Season','Enter Season',Season);
InputBox('Episode Start','Enter Starting Episode',EStart);
E := StrToInt(EStart);
end;
begin
if not Initialized then Initialize;
Filename := 'Mork and Mindy_S'+ Season + 'E' + IntToStr(E) + '.mp4'
E := E +1;
end.
Offline
The signature of the InputBox function:
function InputBox(const ACaption, APrompt, ADefault: String): String;
The 3rd argument only provides the default value. You get the actual user input in the return. See the function reference.
So you should have something like this:
Season := InputBox('Season','Enter Season','1');
EStart := InputBox('Episode Start','Enter Starting Episode','1');
Offline
Excellent Thanks!
Offline