We are about to switch to a new forum software. Until then we have removed the registration on this forum.
OS: windows 10;
I made a simple screen saver
void setup(){
size(displayWidth, displayHeight);
background(0);
frameRate(1000);
}
void draw(){
float x = random(0, 250);
float r = random(0, 255);
float g = random(0, 255);
float b = random(0, 255);
fill(r, g, b);
ellipse(random(0, width), random(0, height), x, x);
}
and exported it as a full size application.
Then I changed its format from .exe to .scr, right click on it and pressed install.Than I open the screensaver setting, select it and press ok, but when the time goes out nothing happens, except the flash of a window.
I think the problem is that when the .scr file is called it doesn't manage to open and crash. How can I fix it?
Answers
i've done this in the past too and got the same results - works fine when tested, just blinks when run due to inactivity
i think windows screensavers have to implement various things in order to run as screensavers, flags
this (which is for c#) lists three command line flags that are standard
https://msdn.microsoft.com/en-us/library/ms686421(v=vs.85).aspx#ss_afterbuild
but i don't know if they are optional. /s might be mandatory, /c is the default (if no flag is supplied)
I found this- https://support.microsoft.com/en-gb/help/182383/info-screen-saver-command-line-arguments
It states that all three are necessary to make a screensaver. That means you have to figure out how to make the sketch display in some other window handle.
With P2, it may have been possible. But with P3, it is probably very difficult.
I found this: http://jorgecardoso.eu/processing/Screensaver/. It's from 2011 but if it's just a wrapper for the processing executable, it might still work.
Did you get this to work? I just tried it out myself on Windows 8.1 but I can't get into the screensaver settings. It's probably not working with the exported files of the latest Processing release.