form data to processing sketch?
in
Programming Questions
•
2 years ago
hi there
Is it possible to get data for a Processing applet from the URI of the page it is running on?
Basically, I have one Processing sketch that will need to have dozens of versions running concurrently, the only difference being some initial variables. I want to have a single HTML page linking to the processing sketch, which then passes a user selection to the sketch; it seems the logical way to do this is with a pull-down menu form, which the Processing sketch uses to populate initial variables.
For example, if my Processing sketch is hosted at:
and I pass form data with the get method:
is there any way to use the variable "bar" in my sketch like this:
- void setup() {
- int bar = intFromFormData;
- }
- println(bar);
- >>>100
any ideas?
1