Loading...
Logo
Processing Forum
jmlatour's Profile
4 Posts
10 Responses
0 Followers

Activity Trend

Last 30 days
Show:
Private Message
    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

    1. void setup() {
        size(300,300);
      }
    exactly the same problem !!

    may be cause by parameters send by windows..
    so i wrote a new code:

    1. 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);

         
      }


    in preview-mode i receved parameters but when the screensaver is supposed to turn on, the mouse hour-glass-animation always keeps flickering !!

    maybe someone can help me...


    Hello,

    Because i have to use few different exe file in the same directory i want to rename lib directory:

    when i export application Processing create exe file and lib directory where i can find jar files.
    if i rename "lib" by "toto" the exe file deosn't work any more so i suppose i have to modify exe file to explain it have to serch jar file in "toto" but i don't find what i have to modify !!

    may be is there a way to tell Processing directly create "toto"

    is somebody has an idea ?
    Hello,

    I try to use Threads in order to firtst move several balls.
    You will find here my code and the result.
    I don't understand why i obtain those ghost !
    Maybe someone can help me...

    1. Balle b,b1,b2;
      int fond=155;
      color rouge=color(255,0,0);
      color vert=color(0,255,0);

      void setup() {
        size(200,300);
        background(fond);
        ellipseMode(RADIUS);
       
        b=new Balle(0,0,10,10,0);
        b.start();
        b1=new Balle(0,0,5,2,rouge);
        b1.start();
        b2=new Balle(0,0,8,5,vert);
        b2.start();
      }

      void draw(){

      }



      class Balle extends Thread{ 
        int X;
        int dx;
        int Y;
        int dy;
        int r;
        int v;
        color couleur;

       
      Balle (int x,int y,int ra,int vi,color c){
        X=x;
        Y=y;
        dx=1;dy=1;
        r=ra;
        v=vi;
        couleur=c;


      void start(){
        super.start();
      }

       
      void run(){
        while (X<2000){
          stroke(fond);fill(fond);
          ellipse(X,Y,r,r);
          Deplace(X,Y);
          stroke(couleur);fill(couleur);
          ellipse(X,Y,r,r);
          stroke(fond);fill(fond);
          try {
              sleep((long)(100/v));
            } catch (Exception e) {
            }
        }

       
       
      void Deplace(int x,int y){
       
        X=x+dx;
        Y=y+dy;
        if (X+r>width)dx=-1;
        if (X<r)dx=1;
        if (Y+r>height)dy=-1;
        if (Y<r)dy=1;
      }
       
      }


    Hello,

    I wrote a sketch witch use specifics files to save informations.
    this sketch is exported (.exe).
    those file are saved with .pod extention.
    I want to open my sketch by double clik on ".pod" files in order to use data saved in it.

    Today i succeded to open my sketch when i double click on pod file but i didn't succed to import in my sketch the name of tis file.

    I saw param() function but it works only in brownser.

    Is anybody know how can i use in my skecth the ".pod" file name ?

    I hope my problem is clear ...if not tell me and i try to explain different way.