Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
How to shutdown computer when idle
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Sizes and SizeInt
by
Martin_fr
[
Today
at 09:33:58 am]
Printer Info
by
LeP
[
Today
at 09:25:16 am]
Gitlab site history date.
by
Martin_fr
[
Today
at 09:11:14 am]
WEBP, no DLLs
by
CM630
[
Today
at 08:52:43 am]
XLibre, finally and fortu...
by
Thaddy
[
Today
at 08:49:03 am]
IndySecOpenSSL is now ava...
by
LeP
[
Today
at 08:41:00 am]
Dataset EnableControls/Di...
by
Sharfik
[
Today
at 07:40:21 am]
TVirtualDBTreeEx and upda...
by
Sharfik
[
Today
at 07:36:30 am]
made hooking newinstance ...
by
Thaddy
[
Today
at 06:56:17 am]
Interesting video
by
Curt Carpenter
[
Today
at 04:28:27 am]
how to add a ForEach call...
by
cdbc
[
Today
at 02:19:44 am]
I found an actual use for...
by
jamie
[June 09, 2026, 11:48:04 pm]
Lazarus Main and Gnome/Wa...
by
Jonax
[June 09, 2026, 09:02:10 pm]
[New Component] ExtTabCtr...
by
d7_2_laz
[June 09, 2026, 08:56:07 pm]
MacOS post compilation sc...
by
marcou
[June 09, 2026, 07:30:07 pm]
water filling simulation
by
Dzandaa
[June 09, 2026, 06:53:35 pm]
Pdf Viewer in Pascal
by
Tomxe
[June 09, 2026, 05:00:32 pm]
How can 'Canvas does not ...
by
J-G
[June 09, 2026, 03:05:01 pm]
AArch64. Fast method to c...
by
Thaddy
[June 09, 2026, 01:58:45 pm]
Strange Behaviour at Runt...
by
andrew Bubble
[June 09, 2026, 12:41:49 pm]
Can /my/ AI help me with ...
by
microxa
[June 09, 2026, 12:12:06 pm]
Knigo
by
CM630
[June 09, 2026, 12:05:31 pm]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[June 09, 2026, 11:27:35 am]
[solved] rotate image pro...
by
speter
[June 09, 2026, 10:03:42 am]
TstringGrid read cell col...
by
Josh
[June 08, 2026, 11:05:23 pm]
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: How to shutdown computer when idle (Read 3720 times)
Thaddy
Hero Member
Posts: 19265
Glad to be alive.
Re: How to shutdown computer when idle
«
Reply #15 on:
August 13, 2024, 06:16:56 pm »
If you used the
exact
same code from me or the example from the manuals it should not crash.
Please file a bug report against the documentation example. Both should work, the example from the docs has been working for years. It is standard Linux.
If you did not use the
exact
code, don't do that.
«
Last Edit: August 13, 2024, 06:18:57 pm by Thaddy
»
Logged
objects are fine constructs. You can even initialize them with constructors.
Thaddy
Hero Member
Posts: 19265
Glad to be alive.
Re: How to shutdown computer when idle
«
Reply #16 on:
August 13, 2024, 06:18:23 pm »
You should never ignore errors in this case, but be exact.
Logged
objects are fine constructs. You can even initialize them with constructors.
ginoo
Full Member
Posts: 166
Re: How to shutdown computer when idle
«
Reply #17 on:
August 13, 2024, 06:29:54 pm »
I attach image with source and error. Should this be reported?
Logged
Thaddy
Hero Member
Posts: 19265
Glad to be alive.
Re: How to shutdown computer when idle
«
Reply #18 on:
August 13, 2024, 06:36:20 pm »
Are you using by any chance {$mode delphi} instead of {$mode objfpc} in your program?
What happens if you explicitly define {$mode objfpc}{$H+} ?
«
Last Edit: August 13, 2024, 06:38:35 pm by Thaddy
»
Logged
objects are fine constructs. You can even initialize them with constructors.
ginoo
Full Member
Posts: 166
Re: How to shutdown computer when idle
«
Reply #19 on:
August 13, 2024, 06:44:18 pm »
I tried putting {$mode delphi}, then {$mode objfpc}, then {$mode objfpc}{$H+} in each case it gives that error. Then pressing F9 continues execution.
Logged
Thaddy
Hero Member
Posts: 19265
Glad to be alive.
Re: How to shutdown computer when idle
«
Reply #20 on:
August 13, 2024, 07:20:22 pm »
Does it execute correctly? If so it is a Mint issue (not for the first time Mint isn't really .. well, mint..
)
Logged
objects are fine constructs. You can even initialize them with constructors.
ginoo
Full Member
Posts: 166
Re: How to shutdown computer when idle
«
Reply #21 on:
August 13, 2024, 07:28:49 pm »
Yes, I had written that before as well, but maybe I explained it wrong. You launch the program, then on the return of the fpPause instruction comes up with that error shown in the image, then pressing the F9 key continues execution.
Logged
Print
Pages:
1
[
2
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
How to shutdown computer when idle
TinyPortal
© 2005-2018