WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: JTaylor on December 10, 2020, 07:12:09 PM

Title: wbSundry Extender (Beta)
Post by: JTaylor on December 10, 2020, 07:12:09 PM
Since my Dialog and SQLite Extender development has come to a screeching halt with no resumption in site I decided to turn my energies to another project.  This is the beginning of a project where I want to include a lot of the scripts I use all the time along with some other needs I run into occasionally and wish that WinBatch had such a function or option. Things like the ability to Initialize one row or column of an Array.   UNIX cut feature.   CSV String to an Array and vice versa.   Etc.    Hope I am not being a pain with this stuff...just thought I would share :)


       http://www.jtdata.com/anonymous/wbSundry_1000.zip


Jim
Title: Re: wbSundry Extender (Beta)
Post by: JTaylor on December 11, 2020, 07:08:35 AM
Forgot to include snGetConstants() in the Help file.



This will retrieve the value for the specified Constant and create a Variable of the same name with that value.   

Constant:  The name of the Constant.

Returns:  Value of Constant as well as creating a local variable initialized with that value.

Comments:  Let me know if you find any that are wrong or are missing.   A delimited list with values would be appreciated for any that are missing.

Example:

   snGetConstants("LVM_SETCOLUMNWIDTH")

         Message("VAR", LVM_SETCOLUMNWIDTH)
Title: Re: wbSundry Extender (Beta)
Post by: kdmoyers on December 11, 2020, 08:21:46 AM
I really really like the cut function.  I do a lot of this stuff.
Thanks Jim!
Title: Re: wbSundry Extender (Beta)
Post by: JTaylor on December 11, 2020, 08:48:33 AM
Thought you might.   It was probably the most challenging to implement out of this group.  Every time I thought I had it I would find a particular parameter set would fail.  Just let me know if you find anything like that.  Thanks.

Jim
Title: Re: wbSundry Extender (Beta)
Post by: bottomleypotts on December 13, 2020, 09:11:57 PM
Thank you very much for this Jim. It has come at a very opportune time. Much needed ArrayToStrCSV will assist me greatly!
Title: Re: wbSundry Extender (Beta)
Post by: JTaylor on December 14, 2020, 06:31:38 AM
Glad to hear it.   That and its complement are ones I occasionally had cause to wish were available as well. 

Jim
Title: Re: wbSundry Extender (Beta)
Post by: JTaylor on December 26, 2020, 08:36:08 AM
Posted an update.   http://www.jtdata.com/anonymous/wbSundry.zip

Realized I didn't error out process when cut column was out of bounds.  Also added a parameter to snStrCut() to allow one to pad the lines with blank spaces in the event a column is out of bounds, so it will handle variable length lines.

Jim