You are here: PSPad forum > English discussion forum > Re: Is there a way to shell out so I can sort my variable declarations?

Re: Is there a way to shell out so I can sort my variable declarations?

#1 Is there a way to shell out so I can sort my variable declarations?

Posted by: therium | Date: 2016-08-04 11:04 | IP: IP Logged

PSPad 4.5.8 on Windows. The "Help" option under the Help menu is grayed out so I couldn't use it.

I want to sort Perl variable declarations. One unsorted declaration could look like this:

my($c,$desc,$a,$weight, $com);

I would want to sort it to look like this:

my($a,$c,$com,$desc,$weight);

Another declaration might look like this:

my($c,$desc,$a,$weight, $com,
$stuff,$model,$height);

The sorted output might look like this:

my($a,$c,$com,$desc,$height,$model,$stuff,$weight);

Is there a way to shell out to Perl and pass the selected text as the command line to the perl program? The call to the Perl program would look like this:

perl sortvar.pl 'selected text'

Thank you.

Options: Reply | Quote | Up ^


#2 Re: Is there a way to shell out so I can sort my variable declarations?

Posted by: pspad | Date: 2016-08-04 11:25 | IP: IP Logged

1. download and install current PSPad version 4.6.1
Help is disabled, cause pspad.chm file is missing in PSPad folder

You can send selected text into any external application. Use variable %SelText% as parameter.
I suggest you donwload portable version of PSPad and replace content of PSPad folder with archive content.

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