Hi,
I have the same issue here with trying to get Porcessing to launch a .bat or the .exe I compiled.
I am using Windows 7 Ultimate and Processing 1.5.1 I have also completed all the following methods on 1.2.
Currently installed java updates are 1.6.0_25 and 1.6.0_26.
Project aim is to take RFiD tag reads and use the Tag ID (tounchatag library) to start a batch file. The .bat is a simple menu at the moment.
The strange thing is that this has previously worked, when I started out on this little project it worked using a full path method then when I came back to it over the weekend nothing would launch the .bat/.exe file.
Why does the problem exist and can anyone help me solve my issue.
I have no problem launching notepad which pops up straight away using the full path open() method. Methods tested so far, this doesn't include all the processing code just the final couple.
- void drawTags(String[] tagList, int pos) {
for (int i = 0; i < tagList.length; i++) {
text(tagList[i], (pos + 1) * 100, (i * 10) + 200);
println(tagList);
launchapp(tagList[i]) ;
}
}
//launchapp to run the string parameters and launch the program
void launchapp(String tag) {
//if (tag.equals("04c72ab9232580") )
//open("C:/Windows/system32/notepad.exe"); This used as a test
//else
//text("Incorrect Tag to Launch App", x, 255);
- // First Method - Failed
if (tag.equals("040443b9b20281") )
open("cmd /c C:/Users/ali/Documents/Processing/APP_to_Launch_RFiD1/xbmc.bat");
else
text("Incorrect Tag to Launch App", x, 255);
}
- // // Second Method - Failed
- if (tag.equals("040443b9b20281") )
open(" C:/Users/ali/Documents/Processing/APP_to_Launch_RFiD1/xbmc.bat");
else
text("Incorrect Tag to Launch App", x, 255);
}
- // Third Method - Failed also tested without "+"
- if (tag.equals("040443b9b20281") )
- open("rundll32 SHELL32.DLL,ShellExec_RunDLL" + "C:/Users/ali/Documents/Processing/APP_to_Launch_RFiD1/xbmc.bat");
- else
text("Incorrect Tag to Launch App", x, 255);
}
- // Fourth Method - Failed
String[] params = { "C:/Users/ali/Documents/Processing/APP_to_Launch_RFiD1/xbmc.bat " };
open(params);
println(params);
I am going a little bit crazy trying to work out what is stopping this from running and why is has previously worked just using the full path.
Many Thanks in advance for some support here
Ali