Two ways to improve the efficiency of unigui development

- Exit the running program when compiling.
When doing unigui development, every time you compile and run, the unigui application will run in the background. You must manually exit the application in the taskbar every time you recompile. This is very troublesome. You can add kill in the project compilation parameters. Process commands, so that the old process will be automatically killed every time you recompile.

The command parameters are as follows: taskkill /f /im $(OUTPUTFILENAME) 2>1 || exit /B 0
- Every time the application is run, the browser is automatically invoked to open the application.
It’s still a bit troublesome to manually open the browser every time you run the application, enter the address and each port, and add the automatic startup method to the ServerModule, and you can open the browser and open the application every time you run it.
procedure ExploreWeb(page:PChar);
var Returnvalue: Integer;
begin
Returnvalue := ShellExecute(0,’open’,page, nil, nil, 1);
if Returnvalue <= 32 then
begin
case Returnvalue of
0: ShowMessage('Error, insufficient memory!');
2: ShowMessage('Error, file name is wrong!');
3: ShowMessage('Error, the path name is wrong!');
11: ShowMessage('Error, the EXE file is invalid!');
else
ShowMessage(PChar('Error code:'+IntToStr(Returnvalue)+', please check the error.'));
end;
end;
Here is the calling method
procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
ExploreWeb(‘http://127.0.0.1:8080’);
end;