Hola
El error es simplisimo.
El mismo programa te lo esta diciendo.
No son compatibles integer y string.
Veamos tu arreglo:
Hay dos datos iguales, uno el nombre de la funcion y otro el que adhieres a el memo, son el mismo, pero uno es Integer y otro string.
Tu funcion la cambiaste a integer:
Código Delphi
[-]
Function TForm1.TransformaTiempo:Integer;
Var
H,M,S:Integer;
Begin
H:=StrToInt(EdHora.Text);
M:=StrToInt(EdMin.Text);
S:=StrToInt(EdSeg.Text);
TransformaTiempo:=H*3600+M*60+S;
End;
bien, si funciona entonces deberias de recoger el dato de esa funcion en los mismos terminos, si pide integer, devuelvo integer:
Código Delphi
[-]
procedure TForm1.BotApagarClick(Sender: TObject);
begin
MemoBat.lines.add('shutdown /s /t '+IntToSTr(TransformaTiempo);
MemoBat.lines.SaveToFile(ExtractFilePath(Application.ExeName)+'Apagar.Bat');
WinExec(PChar(ExtractFilePath(Application.ExeName)+'Apagar.Bat'),SW_SHOWNORMAL);
Sleep(250);
DeleteFile(PChar(ExtractFilePath(Application.ExeName)+'Apagar.Bat'));
MemoBat.lines.clear;
end;
A ver que te dice ahora.
Saludos