Topic: Script blocking

My Script stops when it encounters an "end." and cannot continue the rest of the program.
I tried to put "end;" but without result he does not accept it. I happen to have multiple data that ends with an "end." and it bothers me a bit I'm stuck.
Is there a way around this feature?

Sabine

Re: Script blocking

Your script should have the structure

procedure ....
begin
...
end;

...

begin

end.

and block

begin

end.

should be the last one in the script
Otherwise, the job will be wrong.

3 (edited by sdpc62 2021-10-30 12:32:02)

Re: Script blocking

My structure is this: and I cannot replace (.) With (;) because the program does not accept it.

procédure .....
begin
...
end.

procedure ....
begin
...
end.

procedure ....
begin
...
end.

begin

end.

Re: Script blocking

As always, it would help if you attach your project, otherwise it's just guesswork.
Derek..

5 (edited by sparrow 2021-10-30 13:16:55)

Re: Script blocking

The procedures you create must end with  ;

procedure ....
begin
...
end;

and ONLY ONE at the end

begin

end.

Derek is right, it would help if you attach your project

Re: Script blocking

My project is too big to send here.

Re: Script blocking

Attach the script.pas file. Although this reduces the chances of solving the problem.

Re: Script blocking

here is the file:

Post's attachments

Attachment icon script.zip 713 b, 160 downloads since 2021-10-30 

Re: Script blocking

Look at lines 39-42. Even with a comment.

begin
AjoutVoiture.ComboBox1.HideTextIfNotExists := False;                 

end. // this "end." blocks the rest of the program

This is what I was talking about and what interferes with the work.
You can comment them out or delete them.
At the end of the script, you have the same block.

Re: Script blocking

Yes it is true that I have the same block but for another function since one is for "Car" and the other for "Drain".
These are two working forms and I need them, so what can I do to unblock the "end." so that the program continues on the other form.

Re: Script blocking

here is the edited version.
I will repeat block

begin
end.

there should be only one and at the end of the script.

Post's attachments

Attachment icon script.zip 755 b, 140 downloads since 2021-10-30 

12 (edited by sdpc62 2021-10-31 10:58:58)

Re: Script blocking

The procedure works well, I have grouped the functions as your review and I have no more problems.
Thank you so much.


Sabine