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
Class helpers cannot have...
by
vfclists
[
Today
at 06:51:12 pm]
Ubuntu Mate / Laz 2.2.6 /...
by
ArtLogi
[
Today
at 06:49:52 pm]
Ability to use the Win ke...
by
furious programming
[
Today
at 06:49:02 pm]
Why MaxDouble does not eq...
by
BrunoK
[
Today
at 06:34:21 pm]
scrolling Tmemos simultan...
by
MarkMLl
[
Today
at 06:32:03 pm]
Breakpoint in a procedure...
by
MarkMLl
[
Today
at 06:23:00 pm]
Time Format
by
paweld
[
Today
at 06:21:50 pm]
RDP viewer in Pascal
by
rvk
[
Today
at 06:18:56 pm]
Making a plea :)
by
BrunoK
[
Today
at 06:09:44 pm]
Some observations on the ...
by
vfclists
[
Today
at 05:23:33 pm]
[SOLVED] About $ and Cent...
by
wp
[
Today
at 04:03:14 pm]
String in binary file
by
Dzandaa
[
Today
at 03:54:51 pm]
Chinese Fonts in fpPDF
by
paweld
[
Today
at 03:19:01 pm]
Besides TForm is there a ...
by
vfclists
[
Today
at 03:11:15 pm]
Optional parameter in fun...
by
carl_caulkett
[
Today
at 02:23:52 pm]
FpcUpDeluxe seems to have...
by
cdbc
[
Today
at 02:12:15 pm]
Q Win SHBrowseForFolder A...
by
d7_2_laz
[
Today
at 01:32:07 pm]
Error printing to zebra p...
by
magleft
[
Today
at 01:07:15 pm]
Use mORMot2 to export PDF...
by
dbannon
[
Today
at 12:33:49 pm]
[Solved] Shell controls s...
by
d2010
[
Today
at 12:13:47 pm]
TPairSplitter control lea...
by
wp
[
Today
at 11:31:27 am]
Xtensa-freertos wiki
by
ccrause
[
Today
at 09:48:49 am]
Building FPC 3.2.2 on Deb...
by
MarkMLl
[
Today
at 09:27:48 am]
Win SHBrowseForFolder API...
by
d2010
[
Today
at 09:02:38 am]
Not able to install "fpc-...
by
dbannon
[
Today
at 07:19:07 am]
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: How to shutdown computer when idle (Read 1810 times)
Thaddy
Hero Member
Posts: 15649
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: 15649
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: 15649
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: 15649
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