We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Is it still possible to open an exported application in processing through another file that it would then use? Essentially I want to open, say an image file, using "open with"... "myExportedApplication.exe" and it send the file path to load the image to setup for me to preload the image.
These three older links below showed how to do this, but I can't seem to get them to work with the newest version of Processing 3.0.1. My application attempts to load but fails without ever showing anything. I also tried 2.2.1. args[0] does not seem to receive the file path data like these links describe. I tried actually copying the code out of the third link below with no luck.
https://processing.org/discourse/beta/num_1240685119.html
Berenger's code from above link:
PImage img;
void setup() {
size(800, 400);
textSize(15);
if (args.length != 0) {
img = loadImage(args[0]);
}
}
void draw() {
text("\n# of args: " + args.length + "\n", 20, 25);
for (int i = 0 ; i < args.length ; i++) {
text(args[i], 20, 75+ i*50);
}
if (args.length != 0) {
image(img, 0, 0);
}
}