You can simply send a WM_CLOSE message to the scripter IDE window:
SendMessage(FindWindow(PChar('TIDEEditorForm'), nil), WM_CLOSE, 0, 0);
I need to close the IDE without the dialog screens asking the user if he wants to save the files that have been changed.
There are several ways. What you've done is not wrong.
procedure TForm4.IDEEngine1ConfirmSaveFile(Sender: TObject; IDEFileType: TIDEFileType; AFileName: string; AFile: TIDEProjectFile; var Action: TIDEConfirmSaveType; var Handled: Boolean); begin Action := cstDontSave; end;
IDEDialog1.IDECloseAction := icaNothing;