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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
memory management
by
440bx
[
Today
at 11:12:09 pm]
Android 4.2.2 Jellybean w...
by
Robert Gilland
[
Today
at 10:58:26 pm]
Another question about cr...
by
carl_caulkett
[
Today
at 10:44:08 pm]
Integer maths > 16 bits
by
MarkMLl
[
Today
at 10:36:50 pm]
FPC on Web3
by
Warfley
[
Today
at 10:35:46 pm]
How can I track down the ...
by
440bx
[
Today
at 10:34:55 pm]
Component with horizontal...
by
jamie
[
Today
at 09:35:49 pm]
COM library once again
by
korba812
[
Today
at 09:30:11 pm]
Circle bare metal environ...
by
bobby100
[
Today
at 08:40:50 pm]
Possible floating point e...
by
ad1mt
[
Today
at 07:38:47 pm]
Error printing to zebra p...
by
rvk
[
Today
at 07:18:49 pm]
combobox inside a treevie...
by
Paolo
[
Today
at 07:11:26 pm]
Win. dark themes, mysteri...
by
d7_2_laz
[
Today
at 06:30:12 pm]
How to query the outer si...
by
rvk
[
Today
at 06:15:33 pm]
Installation on Sequoia
by
pat03uk
[
Today
at 05:17:31 pm]
how to check type of valu...
by
Thaddy
[
Today
at 05:00:48 pm]
[SOLVED] How do I put tex...
by
Ever
[
Today
at 04:21:57 pm]
New Big Integer library i...
by
Bart
[
Today
at 03:50:25 pm]
Launch Starship for the F...
by
Fred vS
[
Today
at 03:45:00 pm]
Are there any plans for L...
by
n7800
[
Today
at 03:42:57 pm]
Another question about cr...
by
Hansvb
[
Today
at 12:28:00 pm]
A four way logic with thr...
by
Thaddy
[
Today
at 11:19:14 am]
Tmemo don't control when ...
by
Joanna
[
Today
at 09:39:51 am]
SQLQuery field not found ...
by
Gebo
[
Today
at 09:08:49 am]
Problem removing Heaptrc ...
by
Thaddy
[
Today
at 07:18:00 am]
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: How to shutdown computer when idle (Read 1853 times)
Thaddy
Hero Member
Posts: 15735
Censorship about opinions does not belong here.
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
If I smell bad code it usually is bad code and that includes my own code.
Thaddy
Hero Member
Posts: 15735
Censorship about opinions does not belong here.
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
If I smell bad code it usually is bad code and that includes my own code.
ginoo
Jr. Member
Posts: 82
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: 15735
Censorship about opinions does not belong here.
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
If I smell bad code it usually is bad code and that includes my own code.
ginoo
Jr. Member
Posts: 82
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: 15735
Censorship about opinions does not belong here.
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
If I smell bad code it usually is bad code and that includes my own code.
ginoo
Jr. Member
Posts: 82
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