You are here: PSPad forum > English discussion forum > length of application command line

length of application command line

#1 length of application command line

Posted by: toralf | Date: 2015-04-16 01:31 | IP: IP Logged

I tried to setup an external application in the highlighter settings with a lot of command line parameters. When I applied it and ran it the application didn't do what I wanted, so when I looked back at the external application the application was cut off after 239 characters.
Is this a limitation of PSPad or is this a limitation of Windows?

In principle the external application has the following scheme:
"C:\WINDOWS\system32\cmd.exe" /c ""C:\<PathToAHK>\AutoHotkey\AutoHotkey.exe" "C:\<PathToScript>\Script.ahk" "%File%" "%SelText%" "%Word%" "%Line%" "%Input%" "%ProjectName%" "%ProjectDir%" "%PSPath%" > "%Temp%\PS

what was cut off was:
Pad.log""

And also the setting in the Log File field was gone.

Could someone point me in the right direction on how to get more parameters on the command line for external applications?

--
Ciao
toralf

Options: Reply | Quote | Up ^


#2 Re: length of application command line

Posted by: pspad | Date: 2015-04-16 03:26 | IP: IP Logged

Lenght of the commandl line is limited by operating system, not an application

Options: Reply | Quote | Up ^


#3 Re: length of application command line

Posted by: myf | Date: 2015-04-16 10:01 | IP: IP Logged

Do you think that resulting command hits the "limit of 2047 or 8191" characters? kb 830473

Options: Reply | Quote | Up ^


#4 Re: length of application command line

Posted by: toralf | Date: 2015-04-16 11:57 | IP: IP Logged

No, it should be way below 1000.

I got around the current limitation by putting most files in the PSPath, so I could use the variable %PSPath% and %WinDir% inside of PSPad. Then it worked with all parameters.

When I click on "Inf" the expanded CL shown is shorter then 500 characters, so even if the normal paths would be slightly longer and the parameter names more verbose I should stay below 1000 characters easily.

--
Ciao
toralf

Options: Reply | Quote | Up ^


#5 Re: length of application command line

Posted by: pspad | Date: 2015-04-16 17:10 | IP: IP Logged

Sorry guys.
I though you run PSPad with parameters, but it's a external tool call.
In this case the limit is given by INI file, where the configuration is stored. I think it's 1024 chars per line.

The only way now for you is use BATCH file where most of the commands can be replaced.
Or you can use PSPad variables and define as variable call of your CMD + AHK into one variable and let there parameters only.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR