How can you change the standard name of a file when you open up processing?

edited December 2016 in Using Processing

I've searched everything!

Tagged:

Answers

  • edited December 2016

    Standard name?
    You mean that name - sketch<Date>.pde?

  • i'd like to know aswell

  • Do you want to

    • have a new default name for a new sketch other than sketch<date/time>.pde; or

    • open an existing project upon startup?

  • I think the first option. Is it possible.

  • edited December 2016

    I'm not sure what @LucianoHag or @P14082003 are asking for, specifically, but here is some background on sketch naming that might be helpful:

    The Processing editor coordinates the default names of both pde files and the folders they are in (as they must match). If you export a sketch and look at the generated .java file you will see that there is a Java class named after the sketch name: for this reason the sketch name must be a valid name for a Java class.

    1. cannot start with a number
    2. no spaces
    3. no special characters

    For a related previous discussion, see:

  • You can change the default-naming of your sketches. In the preferences.txt file there are two relevant lines:

    editor.untitled.prefix=sketch_
    editor.untitled.suffix=yyMMdd
    

    Change them to what ever you want, but keep in mind what jeremydouglass wrote about valid names in java.

  • edited December 2016

    Thanks @benja !

    So, for example:

    editor.untitled.prefix=bosquejo_
    editor.untitled.suffix=MMyy_
    

    will produce:

    bosquejo_1216_a
    

    To be safe, edit preferences.txt only when Processing is not running.

    You can find a quick link to the text file at the bottom of the Menu > File > Preferences dialog box.

Sign In or Register to comment.