node.createExternalProcess

For questions and postings not covered by the other forums
MJones
Posts: 10
Joined: Fri Jan 28, 2011 12:07 pm

node.createExternalProcess

Postby MJones » Tue Nov 08, 2011 12:52 pm

I was looking to use this method instead of the ole _shellExecute but it seems to have a pretty big limitation. The arguments are for some reason passed in a JADE string array which obviously limits the arguments to 64 characters each. The main reason I wanted to use this was because it was modal and generally speaking cleaner. Any smart ways or alternative methods around to get longer string arguments in?

torrie
Posts: 92
Joined: Fri Aug 14, 2009 11:24 am

Re: node.createExternalProcess

Postby torrie » Tue Nov 08, 2011 1:22 pm

The 30 character limit is an issue with file names etc. We've just subclassed the StringArray class and increased the length of each item in the array to 256. Seems to work OK with the createProcess method.

MJones
Posts: 10
Joined: Fri Jan 28, 2011 12:07 pm

Re: node.createExternalProcess

Postby MJones » Tue Nov 08, 2011 2:04 pm

Thanks Torrie, Sometimes the simplest solution is the best.

Cheers!

JohnP
Posts: 73
Joined: Mon Sep 28, 2009 8:41 am
Location: Christchurch

Re: node.createExternalProcess

Postby JohnP » Wed Nov 09, 2011 9:23 am

You can also just put the entire command line in the command parameter, and leave the args array null. This is what I usually do, as it usually results in code that is easier to read.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 15 guests

cron