Hi Mattias, thanks to your suggestions, the results improved, but they are not what I expected.
After polishing my code ('clean up your project output directory and rebuild'), the warnings disappeared and now only one instance of notepad is created. In the instance, the weird text /-5 07:36 28/10/2024507:36 28/10/2024 is written. The good part is: date and time are correct :) The bad part is: I was expecting the string 'some text' to be written :) The mistery thickens :) procedure TForm1.btNotepadClick(Sender: TObject); var app: HWND; begin WinExec('notepad.exe', SW_NORMAL); app := FindWindow(nil,'senza nome - blocco note di windows'); if app = 0 then exit; sleep(500); KeyInput.Press('some text'); end; Any idea? Thank you Peppe On Sun, Oct 27, 2024 at 11:39 PM Mattias Gaertner via lazarus < lazarus@lists.lazarus-ide.org> wrote: > > > On 10/27/24 19:41, duilio foschi via lazarus wrote: > >[...] > > Probably it is not important, but when I compile my applet, I get the > > following warnings: > > > > Messages, Hints: 12 > > Note: Duplicate unit "winmouseinput" in "p201827", orphaned ppu > > "C:\lazarus_projects\automation\lib\i386-win32\winmouseinput.ppu" > > Note: Duplicate unit "winmouseinput" in "LazMouseAndKeyInput 0.9", > > > ppu="C:\lazarus\components\mouseandkeyinput\lib\i386-win32\win32\winmouseinput.ppu", > > source="C:\lazarus\components\mouseandkeyinput\winmouseinput.pas" > > Maybe you added the unit path C:\lazarus\components\mouseandkeyinput\ to > your project. Don't. Adding the package to your project is enough. > Then clean up your project output directory and rebuild. > > Mattias > -- > _______________________________________________ > lazarus mailing list > lazarus@lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus >
-- _______________________________________________ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus