Hi all.
I’m having an issue with idleTime on the Mac for a screensaver. I am running Sonoma and Xojo 3.1.
When I run my program, I use the commands
'reset the screen saver apple supplied
var resetTheScreensaverTime as New Shell
resetTheScreensaverTime.Execute ("defaults -currentHost write com.apple.screensaver idleTime 0”)
'resetTheScreensaverTime.Execute ("defaults -currentHost write com.apple.screensaver idletime 0”)
var mouseDownreadTheScreenSaverTime as New Shell
mouseDownreadTheScreenSaverTime.Execute ("defaults -currentHost read com.apple.screensaver idleTime”)
And it resets the idleTime to 0 (zero). Which can be seen in the screenshot below
Now just before my program ends, I run these commands to turn back ON the screensaver apple provided:
'reset the screen saver apple supplied
var resetTheScreensaverTime as New Shell
resetTheScreensaverTime.Execute ("defaults -currentHost write com.apple.screensaver idleTime 3600”)
'resetTheScreensaverTime.Execute ("defaults -currentHost write com.apple.screensaver idletime 3600”)
var mouseDownreadTheScreenSaverTime as New Shell
mouseDownreadTheScreenSaverTime.Execute ("defaults -currentHost read com.apple.screensaver idleTime”)
//quit the program
Quit
Yet the “start screensaver when inactive does NOT change to the time set.
3600 seconds is 1 hour, which is one of the apple drop down menu selectables.
The com.apple.screensaver (long mac address).plist shows the change, and that the file was hit based on the information part of the preview, and I see the time is what I set it to so the 64000 dollar question is: Why isn’t it changing?
I have tried everything and am even trying to understand launchd to kickstart the screensaver process, but I am really stumped.
Any help is appreciated.
"frohe weihnachten und ein gutes neues jahr!” to one and all.
Regards
5 posts - 2 participants