application to screensaver difficulties
in
Integration and Hardware
•
2 years ago
hello,
I try to build a screensaver so i wrote a sketch which works well in Processing.exported application
i export it and remane ".exe" file ".scr"
I put it in windows directory
Then i opened up the screensaver-picker dialog, and selected my screensaver (which just magicly appeared in the list)..
in preview-mode in the screensaver-picker dialog, it works just perfect..but :
when the time runs out, and the screensaver is supposed to turn on, the mouse hour-glass-animation just keeps flickering !!
soi tried to make a very simple sketch to test this trouble
may be cause by parameters send by windows..
so i wrote a new code:
maybe someone can help me...
I try to build a screensaver so i wrote a sketch which works well in Processing.exported application
i export it and remane ".exe" file ".scr"
I put it in windows directory
Then i opened up the screensaver-picker dialog, and selected my screensaver (which just magicly appeared in the list)..
in preview-mode in the screensaver-picker dialog, it works just perfect..but :
when the time runs out, and the screensaver is supposed to turn on, the mouse hour-glass-animation just keeps flickering !!
soi tried to make a very simple sketch to test this trouble
- void setup() {
size(300,300);
}
may be cause by parameters send by windows..
so i wrote a new code:
- PFont font;
static Hashtable params=new Hashtable();
// here we overwrite PApplet's main entry point (for application mode)
// we're parsing all commandline arguments and copy only the relevant ones
static public void main(String args[]) {
for (int numArg=0;numArg<args.length;numArg++) params.put("p"+numArg,args[numArg]);
// pass on to PApplet entry point
String[] newArgs=new String[1];
/*********************************************************
/* IMPORTANT: replace this with the name of your sketch *
/*********************************************************/
newArgs[0]="test1";
PApplet.main(newArgs);
}
void setup() {
String[] parametre=new String[params.size()];
for(int numParam=0;numParam<params.size();numParam++) {
parametre[numParam]= ((String)params.get("p"+numParam));
if(parametre[numParam]==null)parametre[numParam]="";
}
size(300,300);
font=loadFont("ArialMT-48.vlw");
textFont(font);
for(int numParam=0;numParam<parametre.length;numParam++)
text(parametre[numParam],0,50*numParam+50);
}
maybe someone can help me...
1