WinBatch, WebBatch, and WinBatch+Compiler 2025A are now available for download.
Users with a current license may download the latest version of the software from the download page.
https://www.winbatch.com/download.html - use the "Click here to download WinBatch+Compiler" link.
If you do not have a current license and are interested in this and future releases, please visit our software purchase page. You can easily order online.
https://commerce.winbatch.com
Release notes:
WB 2025a 2025 Jan 24, 2025
DLL 6.25aya First appearing in WB 2025A
Added embedded array support for referencing COM and CLR hosting safearrays using multiple
bracket syntax.
Limitations:
Safearray elements of type safearrays can not be passed to the ArrInitialize, ArrayReDim,
ArrayRemove, ArrayInsert, ArrayReverse, and ArraySwapElements functions. However top-level
safearrays with embedded safearrays can be passed to these functions.
Since safearrays are passed by value to User Defined Procedures(UDPs), modifications to
safearray arguments made inside UDPs are not reflected in the caller's safearray argument
variables. This behavior is not a change from previous versions of WinBatch but also applies
to embedded safearray elements used as UDF arguments.
Modified the FileFullName function to insert a missing backslash (\) into a path after the drive
letter plus colon when the indicated drive does not have a current working directory.
Added support for floating point time values to the Display function's duration parameter.
Modified the TerminateApp function by adding option 4 to the "name-type" parameter. Option 4
indicates that the "winname/appname" parameter contains the process ID of the application to
terminate.
Added support for item lists and a "by" clause in ForEach statements. The "by" clause is used
to indicate the single character delimiter of an item list ForEach collection variable.
New function:
ArraySlice( array, start-sub1 , end-sub1 [,start-sub2 ,end-sub2 [,start-sub3 ,end-sub3 [,start-sub4 ,end-sub4 ,[start-sub5 ,end-sub5]]]])
Returns an array containing all or a subset of the elements of the passed-in array.
start-sub1: [optional first subscript of first array dimension.
end-sub1: optional] last subscript of first array dimension.
start-sub2: [optional first subscript of second array dimension.
end-sub2: optional] last subscript of second array dimension.
start-sub3: [optional first subscript of third array dimension.
end-sub3: optional] last subscript of third array dimension.
start-sub4: [optional first subscript of fourth array dimension.
end-sub4: optional] last subscript of fourth array dimension.
start-sub5: [optional first subscript of fifth array dimension.
end-sub5: optional] last subscript of fifth array dimension.
Note: use -1 to indicate the last element of a dimension.
Dialogs and Dialog Editor:
Added workaround for a Windows bug that could cause a script to hang when a dialog terminates
via valid script statements in a User Defined Callback Procedure.
OMG this is so good!!!!!
QuoteAdded support for item lists and a "by" clause in ForEach statements. The "by" clause is used
to indicate the single character delimiter of an item list ForEach collection variable.
Quality-Of-Life syntax candy like this is such a pleasant surprise. Thanks Developers!
Agreed. I just went to all the extra work to make most of my WebView2 return values into single dimension arrays instead of tab delimited lists for the express purpose of using ForEach. Probably still the best choice but would probably had been lazy if this were available.
Jim
Quote from: kdmoyers on January 28, 2025, 11:59:45 AMOMG this is so good!!!!!
QuoteAdded support for item lists and a "by" clause in ForEach statements. The "by" clause is used
to indicate the single character delimiter of an item list ForEach collection variable.
Its presence is the result of a certain developer getting tired of typing ForEach only to remember that it didn't work with lists and a suggestion for such functionally offered by kmoyers several years ago.
> Added support for floating point time values to the Display function's duration parameter.
Ahhh! I've been wanting this for YEARS. Thanks Tony!
_cnt = 0
while 1
_cnt += 1
if _cnt > 20 then BREAK
display(0.25, `Hey TD`, `%_cnt% Million Thankyews`)
timeDelay(0.25)
endwhile
EXIT
Wouldn't it be easier to use a FOR/NEXT loop (instead the WHILE loop) ?
Quite right... but early on in my WinBatching I encountered an example showing the while 1 loop and it lit a previously unlit brain cell and I realized the possibilities. So I've tried to demo that less obvious example for other n00bs ever since.