We have just released WinBatch, WebBatch and WinBatch+Compiler 2017A.
Customers on an active maintenance plan may download the latest version of the software from the download page.
http://www.winbatch.com/download.html
If you do not have a current maintenance plan and are interested in getting updated, please visit our software maintenance renewal page. You can easily order online.
http://renewal.winbatch.com
WB 2017A Jan 04, 2017
DLL 6.17aqa First showing up in WB 2017A
Fixed defect in the BoxTitle and BoxOpen functions that could cause process memory
corruption when the title parameter contained text longer than 256 characters.
Fixed defect in AskFileName function that made it necessary to provide at least one file
type definition when using flag parameter values of 100 or higher.
Added new flag value to AskDirectory:
32 makes directory browse dialog an owned window. The value 32 can be combined with other
flag parameter values.
Modified IntControl 78 to to make it possible to free a single UDF or UDS. To free a single
UDF or UDS specify a value of 1 in the p1 parameter and place the name of the UDF or UDS to be
freed in the p2 parameter. A single UDF or UDS cannot be freed while it is executing.
Added more descriptive error message when a UDF or UDS associated with a callback handle by
'DllCallbackCreate' is used by a process thread other than the main WIL thread.
Added extended-length path support to the following file and directory functions:
DirAttrGet
DirAttrGetEx
DirAttrSet
DirAttrSetEx
DirExist
DirInfoToArray
DirMake
DirRemove
DirSize
FileAppend
FileAttrGet
FileAttrGetEx
FileAttrSet
FileAttrSetEx
FileCompare
FileCopy
FileDelete
FileExist
FileGet
FileGetW
FileInfoToArray
FileItemize
FileItemPath
FileMapName
FileMove
FileNameLong
FileNameShort
FileOpen
FilePut
FilePutW
FileRename
FileSize
FileSizeEx
FileTimeCode
FileTimeGet
FileTimeGetEx
FileTimeSet
FileTimeSetEx
FileTimeTouch
FileVerInfo
FileYmdHms
The following functions support extended-length paths but require extended-length file
paths be converted to a Unicode string before being passed to the function:
BinaryRead
BinaryReadEx
BinaryWrite
BinaryWriteEx
Extended-length paths are file and directory names that have a combined length greater
than 259 characters with a maximum length of approximately 32766 characters. When passing
an extended path to a supporting function, the path must be an absolute path. It cannot be
a partial nor relative path and path segments must be separated by back slashes (\).
Forward slashes (/) cannot be used. Either the "\\?\" prefix for local path or the
"\\?\UNC\" for UNC paths can be added to beginning of a path to improve performance. The
"\\?\" prefix should be placed before the drive letter of a local path. The "\\?\UNC\"
prefix should replace the leading "\\" for UNC (share) paths. Supporting functions that
return absolute paths automatically include the appropriate extended-length path prefix
when the total length exceeds 259 characters. Note that optical media, like the ISO 9660
CD/DVD format, often have more restrictions on the length of files, folders, and paths
than the Windows operating system so these devices may not support extended-length paths.
New IntControl:
IntControl(99, p1, 0, 0, 0)
Unloads a previously added extender. Returns 1 if the extender was unloaded and 0
otherwise.
p1 File name of extender to unload.
WinBatch Studio:
Eliminated UI artifacts in the Project Window on Windows XP systems.
Project file items are now either selected or highlighted when added to a project in the
Project Window tree.
Common Language Runtime (CLR) Hosting:
Improved support for multiple field structs (value types) returned by dotNet object
methods and properties. Note that structs must still have the COM Visible attribute in
order to create an instance of the struct in a WIL script.
Added a "useany" option to the 'ObjectClrOption' function. The option is similar to the
function's "use" option for loading assemblies except that it does not require a strong
assembly name. Instead the option attempts to load an assembly using the assembly's weak
name. An assembly's weak name is an assembly name without the Version, Culture,
PublicKeyToken and optional processorArchitecture values. The function performs the
"useany" task by searching the Global Assembly Cache (GAC) for the latest version of the
named assembly. It is not necessary to use the option to load non-GAC assemblies because
the CLR does not require that non-GAC assemblies have strong assembly names. Setting the
CLR version using this function's "version" option limits "useany" to search for GAC
assemblies associated with the specified version and older versions of the CLR.
Changes to the Dialog and related functions:
Added a DATETIME control. The DATETIME control is the WIL Dialog implementation of the
Date and Time Picker Windows Common Control. It can be used to both display and receive
date and time input in multiple formats.
The DATETIME control uses all dialog template control definition attributes except
'value' with the following control specific meanings:
var - The name of a variable that receives the user selected date/time from the
control on a non-canceling exit from the dialog. Optionally, the variable can
contain a vertical bar(|) delimited list of YMDHMS date and time values. The
first item of the list is used as the control's initial date/time. The second
item is the minimum date/time the control will accept and the third item is the
maximum date/time the control will accept. Use an empty list elements to use
the control's default for the respective item. Using DEFAULT instead of a
variable name sets the date/time to the current date/time with control defined
limits.
text - The text attribute is used to indicate the date/time format the control
displays. Specifying 'DEFAULT' or using an empty string causes the control to
use the current system default date format. The following table lists the
standard Windows date/time format characters accepted and interpreted by the
control. Nonformat character are accepted but they must be with a few
exceptions enclosed in single (') quotes.
Format Used For Description
d Days Displays the day as a number from 1 to 31
dd Days Displays the day as a number with a leading 0 if the
number is less than 10
ddd Weekdays Displays a weekday name with 3 letters as Mon, Tue, etc
dddd Weekdays Displays the complete name of a week day as Monday, etc
M Months Displays the numeric month from 1 to 12
MM Months Displays the numeric month with a leading 0 if the number
is less than 10
MMM Months Displays the short name of the month as Jan, Feb, Mar, etc
MMMM Months Displays the complete name of the month as January, etc
yy Years Displays two digits for the year as 16 for 2016 or 03 for
2003
yyyy Years Displays the numeric year with 4 digits
h Hours Hours with no leading zero for single-digit hours; 12-hour
clock.
hh Hours Hours with leading zero for single-digit hours; 12-hour
clock.
H Hours Hours with no leading zero for single-digit hours; 24-hour
clock.
HH Hours Hours with leading zero for single-digit hours; 24-hour
clock.
m Minutes Minutes with no leading zero for single-digit minutes.
mm Minutes Minutes with leading zero for single-digit minutes.
s Seconds Seconds with no leading zero for single-digit seconds.
ss Seconds Seconds with leading zero for single-digit seconds.
t Time Mark One-character abbreviation (for example, A or P).
tt Time Mark Two-character abbreviation (for example, AM or PM).
style - The control supports the @csInvisible(1) and @csDisabled(2) styles. In addition
the control accepts the following new styles:
@csCheckbox (134217728) - Adds a check box that indicates no date/time value
when unchecked.
@csSpinner (536870912) - Replaces the controls drop down calendar with a
spinner. The spinner can be used to change the
value of individual elements of the displayed
date-time.
font - Sets the display font for both the edit and drop down calendar elements of the
control.
textcolor - Sets the text color for the drop down calendar element only.
backgroundcolor - Sets the background color for the drop down calendar element only.
Added the following new event code to the 'DialogProcOptions' function in support of the
new DATETIME control:
@deDtChange(23) - Date or time change: user has changed the date/time. This event
also fires if the date/time range is changed and the current
value of the DATETIME control does not fall within that range.
The new control date/time is passed to user defined callbacks in
the callback's fifth parameter.
Modified the 'DialogControlGet' function to support a new DATETIME request codes:
@dcFormat(28) - Returns a DATETIME control's current format as a string. The
function returns an empty string if no format was previously
specified.
Use the @dcDate(7) request code to obtain the date/time shown in the control in
YYYY:MM:DD:HH:MM:SS format. Use the @dcText request code to obtain the date/time as
text in the format displayed by the control.
Modified the 'DialogControlSet' function to support a new DATETIME request codes:
@dcFormat(28) - Sets a DATETIME control's current display format using the special
format characters also used in the control's template text
attribute.
Use the @dcDate(7) request code to set the date/time shown in the control. The
date/time should be in the YYYY:MM:DD:HH:MM:SS format with one exception. When the
control has the @csCheckBox style, an empty string ("") can be sent to the control
to uncheck the control's chechbox. The empty string does not change the displayed
date/time. The control's range can also be set using a vertical bar(|) delimited
list of YMDHMS date and time values. Neither the @dcText nor @dcTitle request code
can be used to set the displayed date.
The DialogControlState request code @dcsGetStyle can be used to determine whether or not
the @csCheckBox and @csSpinner styles are set for the DATETIME control However, the
@dcsRemStyle or @dcsAddStyle request codes cannot be used to change the @csCheckbox and
@csSpinner styles. The @dcsRemStyle or @dcsAddStyle request codes can be used to change
the DATETIME control's @csInvisible and @csDisabled styles.
This is awesome Tony! Thanks!
-K
Thanks for adding the @dcText option and the way it unchecks the box when sending a blank string for the date. VERY helpful. Also, maybe this is by design or something that can't be changed but it does return a date using @dcText when the box is unchecked.
Thanks again.
Jim
Quote from: JTaylor on January 05, 2017, 08:33:53 AM
Thanks for adding the @dcText option and the way it unchecks the box when sending a blank string for the date. VERY helpful. Also, maybe this is by design or something that can't be changed but it does return a date using @dcText when the box is unchecked.
Thanks again.
Jim
As previously mentioned, an 'unchecked' box means no date so the control is working exactly as MSFT intended it to.
I understand that unchecked means no date so shouldn't it indicate a problem when it is returning a date when the box is unchecked, or am I misunderstanding?
Jim
Again, the control is working as MSFT intended. We have not made any modifications that effect the way the control reports its displayed text (as apposed to date/time.)
Okay. Might be good to mention the inconsistency in the documentation. I realize it might be working the way MSFT intended but if one unchecks the box and is told that an unchecked box means there is no date then one would, in my mind, expect it to return no date. Instead one gets a date and then one has to check to see if one really should be getting a date or not and if not then alter the date value accordingly.
Jim
date/time != control text.
Once again, I understand, but, SURELY, you see the problem I am raising???
Jim