Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to make my Mac not sleeping?
Feedback.

Answer: Just inform the Mac OS about some system activity with code like this:
Example:
Sub UpdateSystemActivity()
#if TargetWin32
'nothing on Windows
#else
#if TargetCarbon
declare function myUpdateSystemActivity lib "CarbonLib" alias "UpdateSystemActivity" (activity as integer) as short
#else
declare function myUpdateSystemActivity lib "PowerMgrLib" alias "UpdateSystemActivity" (activity as integer) as short
#endif

const OverallAct = 0 // Delays idle sleep by small amount */
const UsrActivity = 1 // Delays idle sleep and dimming by timeout time */
const NetActivity = 2 // Delays idle sleep and power cycling by small amount */
const HDActivity = 3 // Delays hard drive spindown and idle sleep by small amount */
const IdleActivity = 4 // Delays idle sleep by timeout time */

dim e as integer

e=myUpdateSystemActivity(UsrActivity)

// you may react on an error if e is not 0 after the call.

#endif
End Sub

Notes:
You may use another constant if you prefer some different behavior.
Call it maybe every second.



Links
MBS Realbasic PDF Plugins - Pfarrgemeinde St. Arnulf Nickenich