Page Date
2004-05-18
DD-Software
Kapitel zurück / previous Chapter
Main Index
 
Seite zurück / previous page
Backward
Seite vor / next page
Forward
 
Seitenanfang/TopOfPage
Top
Seitenende/EndOfPage
Bottom
MyWbtHelp current version

WinBatch Scripting - Extender (3rd Party and Free)



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

xGS - Ghostscript Extender

Author:
   Alan Kreutzer

Info:
   The Ghostscript Extender provides an interface between WinBatch
   and the GhostScript interpreter.

   To use the extender you must download and install GhostScript.
   You can find it here ... http://www.ghostscript.com/doc/

   The extender has been tested with AFPL GhostScript version 8.11,
   it may not work correctly with other versions.

   Once GhostScript has been installed, find the GhostScript API DLL
   (gsdll32.dll in the ghostscript "BIN" directory.)
   You must copy this dll into the same directory as the GhostScript Extender DLL.

Version:
   15.08.2003
   PRODUCTVERSION 10000

Download:
   ghostx.zip  35 KB

Usage:
   AddExtender("xgs34i.dll")

Functions:

   GhostscriptExtenderInfo (n)
      n = 0 ... returns the extender version
      n = 1 ... returns the number of functions
      n = 2 ... returns the number of constants

   GhostscriptVersion ()
      Returns the version of the GhostScript interpereter

   GhostscriptPS2PDF (InputFile, OutputFile)
      InputFile  ... The name of a Postscript print file.
      OutputFile ... The name of a PDF (Acrobat) file to be created.

      Converts the input file from PostScript to PDF.
      Returns 0 if successful.
      A non-zero return indicates an error.

   GhostscriptPrint (InputFile [,Printer [,WindowFlag]])
      InputFile  ... The name of a Postscript or PDF file to be printed.
      OutputFile ... The name of a printer on your system.
                     If this is an empty string, or is omitted,
                     the user will be prompted for the printer name.
      Window ....... @TRUE = Display a window which includes a CANCEL button.
                     @FALSE = No window.
                     If this is omitted, the default is @TRUE.

      Sends a Postscript or PDF file to the printer.
      (The printer does not need to be Postscript compatible.)
      It assumes standard size (letter) paper.

   GhostscriptCommand (Parameter, Parameter, ...)
      Executes GhostScript with any parameters that would be valid on the command line.
      You may specify up to 16 parameters.
      The command line parameters are described in the GhostScript documentation,
      which you will find in the GhostScript install folder, in the "DOC" folder.

      Note that the command line options  -dNOPAUSE and -q are always used,
      whether you specify them or not.

      Example... to convert a PDF file to a JPG:
         Status = ghostscriptCommand("-sDEVICE=jpeg","-sOutputFile=Map.jpg","Map.pdf")

   GhostscriptMessages ()
      Returns the messages that the GhostScript interpereter printed to "stdout" and "errout".
      These messages are not usually needed, but may help determine the problem when a command is failing.



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

COM - Component Object Model Extender

Author:
   Carlos LLuch Caldentey a.k.a Guido

   THIS SOFTWARE IS DISTRIBUTED "AS IS".
   NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.
   YOU USE AT YOUR OWN RISK.
   THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS,
   DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS
   WHILE USING OR MISUSING THIS SOFTWARE.
   THIS SOFTWARE CAN BE FREELY DISTRIBUTED BUT CAN NOT BE SOLD.
   COM Extender Copyright(c) 2003 Carlos LLuch Caldentey

Version:
   05/03
   PRODUCTVERSION 31000

Download:
   comext.zip  16 KB

Usage:
   AddExtender("com.dll")

Functions:

   This extender lets you access COM objects.
   It works in combination with a set of udfs 'comudf.wbt'.

   The extender has a single function:

   COMCall(method, pobj [,arg1 ...])

   method : is the 0 based index of the method in the object VTable.
            3 constants are supplied by the extender for the first three
            methods in the table, that are always the same for any object:

            @QueryInterface (0)
            @AddRef         (1)
            @Release        (2)

   pobj   : a pointer to the object,
            this value is returned by the udf COMCreateObject().

   arg    : optional parameter, for the method arguments, up to 14 arguments
            can be passed.
            This is an integer value, to pass strings use the udfs:
            StrToVT_BSTR(), StrToBSTR() and StrToLPSTR() .
            These functions return a buffer handle,
            you will need to use intcontrol42 to pass the buffer address,
            and then free the buffer.


   How to get the method value:

   In some cases the VTable is exposed at msdn,
   the method is the 0 based index(position) of the method in the VTable.

   If the VTable is not exposed you need to look at the header
   where the object is defined.
   In the object description at msdn you will see in which header it is defined.

   To get the headers you will need some C/C++ working envirorment.
   Dev-C++ is free, this extender is done with it,
   look in the include folder for the headers.



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

C-Variables WIL Extender

Author:
   Copyright (c) 2003 Artomegus.
   May be distributed freely.
   Provided "as is" without warranty of any kind, either express or implied.
   Use at your own risk.

Version:
   15.07.2003
   PRODUCTVERSION 31002

Download:
   wcvar.zip  111 KB

Usage:
   AddExtender("wcvar34i.dll")

Functions:
   - Heap functions

   cvHeapCreate( [ heap-size [, max-identifiers ] ] )
      Allocates the C-Variables heap for the current WinBatch script

   cvHeapDestroy( )
      Frees the C-Variables heap for the current WinBatch script

   cvStatePop( )
      Pops the current heap state off an internal stack

   cvStatePush( )
      Saves the current heap state on an internal stack


   - Type definition functions:

   cvFieldDef( prototype, field-name )
      Define a field in a structure/union

   cvStructBegin( )
      Begin a sub-structure within a structure/union

   cvStructDef( type-name )
      Begin the definition of a new structure type

   cvStructEnd( )
      End a structure or sub-structure

   cvTypeDef( prototype, type-name )
      Define a new type based on a prototype

   cvUnionBegin( )
      Begin a sub-union within a structure/union

   cvUnionDef( type-name )
      Begin the definition of a new union type

   cvUnionEnd( )
      End a union or sub-union


   - General variable functions:

   cvCast( [ prototype, ] reference )
      Collapses a reference, optionally casting it as a different type

   cvDef( prototype, var-name [, value ] )
      Defines a new variable and optionally sets the value

   cvGet( reference )
      Gets the value of a variable

   cvHexGet( reference )
      Gets the value of a variable as a hex string

   cvHexSet( reference, value )
      Sets the value of a variable using a hex string

   cvIsDefined( name )
      Checks if a type or variable is defined

   cvItemize( reference, count [, delimiter ] )
      Creates an item list from an array variable

   cvPtr( reference )
      Gets a pointer to a variable

   cvSet( reference, value )
      Sets the value of a variable

   cvSizeOf( name )
      Gets the size of a type or variable


   - String variable functions:

   cvStrDef( var-name, value [, size] )
      Creates a new string variable on the heap, with an optional max size

   cvStrGet( reference )
      Gets the value of a string variable

   cvStrItemize( reference, count [, delimiter ] )
      Creates an item list from a string-array variable

   cvStrLen( reference )
      Gets the length of a string variable

   cvStrSet( reference, value )
      Sets the value of a string variable


   - Memory allocation/checking functions:

   cvIsBadReadPtr( ptr, size )
      Verifies access to read from a block of memory

   cvIsBadStringPtr( ptr, size )
      Verifies access to read a string from memory

   cvIsBadWritePtr( ptr, size )
      Verifies access to write to a block of memory

   cvMemAlloc( size )
      Allocate a block of memory

   cvMemCopy( destination-ptr, source-ptr, size )
      Copy a block of memory

   cvMemFill( destination-ptr, size, byte-value )
      Fills a block of memory with a byte value

   cvMemFree( pointer )
      Free a block of memory


   - Miscellaneous functions:

   cvControl( number [, value ] )
      Reads/sets control values for extender

   cvDllCall( dll-filename, return-var, proc-name, arguments-var )
      Calls a DLL procedure

   cvDllCallC( dll-filename, return-var, proc-name, arguments-var )
      Calls a DLL procedure using the C calling convention

   cvDllLastError( )
      Returns most recent DLL error code after calling cvDllCall or cvCBAutoDllCall

   cvIf( number, value-if-true, value-if-false )
      Returns one of two values depending on the value of a number

   cvInfo( number )
      Gets information about the extender

   cvLastError( number )
      Returns last extender-specific error


   - Callback functions:

   cvCBAutoDllCall( dll-filename, dllproc-returnvar, dllproc-name, dllproc-argsvar, callback-returnvar, callback-argsvar, cbitems-handle, maxcalls )
      Call a DLL procedure that requires a callback function, and automatically collects data sent to the callback function

   cvCBItemDef( handle, index, reference, flag, size )
      Defines a callback item to collect

   cvCBItemError( handle, index )
      Gets the last error that occurred for the callback item

   cvCBItemsAlloc( count, elements-init, elements-add [, strsize-init [, strsize-add ] ] )
      Allocates a buffer for callback items to collect

   cvCBItemsFree( handle )
      Frees up a buffer allocated by cvCBItemsAlloc

   cvCBItemVar( handle, index )
      Creates a reference to the data collected for the callback item.



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

WdGet - Enhanced Word Line Parser Extender

Author:
   Alan Kreutzer

Download:
   wdget34i.zip  35 KB

Usage:
   AddExtender("wdget34i.dll")

Functions:
   WordGetInfo
      Returns information about the extender.
      Syntax: N = WordGetInfo(Request)

   WordGet
      Return a word found in a string.
      Syntax: Word = WordGet (Index, String, Delimiters)

   WordArray
      Return all the words in a string as an array.
      Syntax: Array = WordGet (String, Delimiters  [, ReturnDelimiters])

   WordCount
      Counts the words in a string.
      Word count uses the same rules as WordGet to determine where words end,
      so the return value from WordCount tells how many different words WordGet will return from this line.
      Syntax: Count = WordCount(String, Delimiters)

   WordDelimiter
      Returns the delimiter that follows a word in a string
      Syntax: Delim = WordDelim(Index, String, Delimiters)

   WordRemove
      Removes words from the beginning of a string,
      and returns the remainder of the string.
      Syntax: Text = WordRemove(Index, String, Delimiters)



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

xArray - Array Functions Extender

Author:
   Alan Kreutzer

Version:
   March 2003
   FILEVERSION 2.02.00
   PRODUCTVERSION 2.02.00

Download:
   arrayx.zip  55 KB

Usage:
   AddExtender("Arrayx34i.dll")

Functions:
   ArrayDuplicate
      Create a duplicate of an array
      Syntax: NewArray = ArrayDuplicate(OldArray)

   ArrayizeBytes
      Change a string into an array
      Syntax: NewArray = ArrayizeBytes(String)

   ArrayExtenderVersion
      Return the extender version number
      Syntax: Value = ArrayExtenderVersion([n])
              n = 0 (or is omitted) extender version number
              n = 1  number of functions defined
              n = 2  number of constants defined

   ArrayResize
      Resize an array
      Syntax: NewArray = ArrayResize(OldArray,InitialValue,x1 [,x2,x3,x4,x5])

      OldArray        A WinBatch Array
      InitialValue    Any integer, floating-point, or string value
      x1 .. x5        The dimensions of the new array.
                      x1 is required.
                      x2-x5 are optional, depending on how many
                      many dimensions you wish the array to have.

   ArraySort
      Case sensitive sort
      Syntax: ArraySort(Array [,Direction [,Column]])

   ArraySortNC
      Case insensitive sort
      Syntax: ArraySortNC(Array [,Direction [,Column]])

      Array       A WinBatch Array
      Direction   @ASCENDING for an ascending sort
                  @DESCENDING for a descending sort
                  When omitted, the default is @ASCENDING

      Column      The column to use as the sort key.
                  (When sorting a two dimensional array)
                  When omitted, the default is zero.

   ArrayToList
      Convert array to a delimited list
      Syntax: List = ArraySort(Array [, Delimiter])

      Array       A WinBatch Array
      Delimiter   Any character.
                  The item delimiter used in the list.

      If Delimiter is more than one character, only the first character is used.
      If Delimiter is "" (an empty string) the items are concatenated with no delimiter.
      Delimiter is optional. If omitted, the default delimiter is @TAB.



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

xGlobal - Global Variables Extender

Author:
   Alan Kreutzer

Download:
   xGlobal34i.zip  18 KB

Description:
   In WinBatch 2001, user defined functions have no access
   to the Global variables created by the calling routine,
   and cannot save any values between calls.
   The xGlobal extender is a workaround for this condition.
   xGlobal simulates global variables which are available
   to all of the WinBatch program, including its functions.

Usage:
   AddExtender("xGlob34i.dll")

Functions:
   xGlobalDrop ("Name")
   xGlobalGet ("Name")
   xGlobalIsDefined ("Name")
   xGlobalPut ("Name","Value")
   xGlobalVersion (0)



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

dlgc - Dialog Constants for WinBatch Dialog 6.1

Author:
   Alan Kreutzer

Download:
   dlgc34i.zip  11 KB

Usage:
   AddExtender("dlgc34i.dll")

Functions:
   dlgcVersion()
      Returns the extender version number

Constants:
;------------------------------------------------------------------------------------------------------------------------------------------
DPO_DIALOG_INIT               = 0    ; Dialog has been created but not displayed.
                                     ; This event is only generated once pre dialog session.
DPO_TIMER_EVENT               = 1    ; Set a Timer event.
                                     ; (i) > 0 - milliseconds between callbacks
                                     ; 0 - turn off timer;
                                     ; -1 - return current setting
DPO_PUSHBUTTON_PUSHED         = 2    ; User has pressed a PUSHBUTTON or PICTUREBUTTON control.
                                     ; (i) 1 - turn on event callback
                                     ; 0 - turn off callback
                                     ; -1 - return current setting
DPO_RADIOBUTTON_SELECTED      = 3    ; User has selected a RADIOBUTTON.
DPO_CHECKBOX_CHANGED          = 4    ; User has checked or unchecked a CHECKBOX control.
DPO_EDITBOX_TEXTCHANGED       = 5    ; User has changed the text in an EDITBOX or MULTILINEBOX control.
DPO_MULTILINEBOX_TEXTCHANGED  = 5    ; User has changed the text in an EDITBOX or MULTILINEBOX control.
DPO_FILELISTBOX_FILESELECTED  = 6    ; User has selected a file in a FILELISTBOX control.
DPO_ITEMBOX_ITEMSELECTED      = 7    ; User has selected one or more items in a ITEMBOX control.
DPO_DROPLISTBOX_ITEMCHANGED   = 8    ; User has changed the text appearing at the top of a DROPLISTBOX.
                                     ; This event can be triggered by the user picking a new item from the list portion of the control
                                     ; or by the user typing new text into the control.
DPO_CALENDAR_DATECHANGED      = 9    ; User has selected a new date in a CALENDAR control.
                                     ; Note: cycling the month with the right and left arrows
                                     ; does not produce a callback. The user must click on a
                                     ; specific day of the month.
DPO_SPINNER_NUMBERCHANGED     = 10   ; User has changed the value of a SPINNER control.
DPO_CLOSE                     = 11   ; User has selected the Close command from the system menu.
                                     ; This event only applies to dialog's with system menus
                                     ; enabled by a call to IntControl 49.
DPO_FILELISTBOX_DOUBLECLICKED = 12   ; The user has used the mouse to double-click an item in an FILELISTBOX.
DPO_ITEMBOX_DOUBLECLICKED     = 13   ; The user has used the mouse to double-click an item in an ITEMBOX
DPO_DIALOG_DISABLE            = 1000 ; Grey the dialog's title bar and redraw dialog as necessary.
                                     ; Optionally, display the system's "wait cursor".
                                     ; (i) 1 - disable dialog
                                     ; 2 - disable and wait cursor
                                     ; 0 - enable dialog
                                     ; -1 - return current setting.
DPO_BACKGROUND_CHANGED        = 1001 ; Change the dialog's background bitmap or color.
                                     ; (s) bitmap file name or RBG color string(i)
                                     ; -1 - return current background.

;------------------------------------------------------------------------------------------------------------------------------------------
; DialogControlGet(dialog-handle,  control-number, request-code)
;------------------------------------------------------------------------------------------------------------------------------------------
DCGET_VALUE                  = 1
DCGET_TEXT                   = 3
DCGET_ITEMLIST               = 5
DCGET_ITEM                   = 6
DCGET_SPINNER_VALUE          = 8
;------------------------------------------------------------------------------------------------------------------------------------------
; DialogControlSet(dialog-handle, control-number, set-request-code, set-info)
;------------------------------------------------------------------------------------------------------------------------------------------
DCSET_VALUE                  = 1
DCSET_REPLACE_TEXT           = 3
DCSET_REPLACE_TITLE          = 4
DCSET_REPLACE_LIST           = 5
DCSET_ITEM_SELECTED          = 6
DCSET_SPINNER_VALUE          = 8
DCSET_ADD_ITEM_SORT          = 14
DCSET_REMOVE_ITEM            = 15

;------------------------------------------------------------------------------------------------------------------------------------------
; DialogControlState(dialog-handle,  control-number, request-code, style)
;------------------------------------------------------------------------------------------------------------------------------------------
DCSTATE_NULL                 = 0    ; Dummy.
DCSTATE_SET_FOCUS            = 1    ; Give a control the input focus.
DCSTATE_QUERY_STYLE          = 2    ; Query a control's style.
DCSTATE_ADD_STYLE            = 3    ; Add one or more styles to a control.
DCSTATE_REMOVE_STYLE         = 4    ; Remove styles from a control.
DCSTATE_GET_FOCUS            = 5    ; Get control that has focus

;------------------------------------------------------------------------------------------------------------------------------------------
; Style
;------------------------------------------------------------------------------------------------------------------------------------------
DCSTYLE_INVISIBLE            = 1    ; Control is invisible.
DCSTYLE_DISABLED             = 2    ; Control has disabled appearance and does not accept any user input, if would otherwise accept input.
DCSTYLE_LISTONLY             = 4    ; Control will only accept values already in the drop down list portion of the control.
DCSTYLE_BLOCKINPUT           = 8    ; The controls text cannot be change by typing in new text when the control has the input focus.
                                    ; (Note: The user can still change the value in a SPINNER controls by using the up and down arrows.
DCSTYLE_ASTERISK             = 16   ; Displays all characters as an asterisk (*) as they are typed into the control.
DCSTYLE_DEFAULT              = 32   ; A button with this style is the default button when no push or picture button has the input focus.
DCSTYLE_DIGITS               = 64   ; Allows only digits to be entered into the edit type controls.
                                    ; Note: even with this set, it is still possible to paste non-digits into the edit control.
DCSTYLE_FLAT                 = 128  ; Creates a button with a flat appearance.
;------------------------------------------------------------------------------------------------------------------------------------------



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

zwin - Allows a winbatch program to wait for a window message.

Author:
   Alan Kreutzer

Download:
   zwin34i.zip  13 KB

Usage:
   AddExtender("zwin34i.dll")

Functions:

   zwinVersion(i:request)
      Returns version information on this extender.

   zwinCreate("Window Name", MessageNumber)
      Creates a hidden window.

   zwinCheckMessage()
      Returns...  0 - The user specified message number has not arrived.
                  1 - A message has arrived.
                  2 - The window has been closed

   zwinGetMessage()
      This will not return until the message arrives.

      When the message arrives, it returns a string containing "wParam:lParam"
      (where wParam and lParam are the two optional values passed with the message.)

      You can call zwinGetMessage multiple times.
      Each call will wait until another message arrives.

   zwinDestroy()
      Closes the currently open window.


Constants:
      none



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

xNM - Name Matching Functions

Author:
   Detlev Dalitz

Version:
   20031108
   FILEVERSION    34002
   PRODUCTVERSION 10002

Download:
   Setup package  xnm34i.v34002.zip  50 KB
   Setup package  xnm34i.v34001.zip  35 KB

Usage:
   AddExtender("xnm34i.dll")


---------------------------------------------------------------------------------------------------
   WinBatch Extender "xnm34i.dll"

   (c) Detlev Dalitz.20030208
---------------------------------------------------------------------------------------------------

   The "xNM Name Matching Functions Extender" contains:


   nmExtenderInfo
      Returns extender related information.

      Syntax:
         i:Number = nmExtenderInfo (i:Request)

            Request = 0 ==> Version
            Request = 1 ==> Total Functions
            Request = 2 ==> Total Constants


   nmSoundex (including extended Soundex)
      Syntax: s:SoundexString = nmSoundex (s:String, i:SoundexMode)
              SoundexMode = 0 ==> Normal   Soundex 4 Byte.
              SoundexMode = 1 ==> Extended Soundex 5 Byte.


   nmMetaphone
      Syntax: s:MetaphoneString = nmMetaphone (s:String, i:Length)

      Note:
      This is the C implementation by Sadru Fidai Tue, 21 Feb 1995.
      That means: "technical" sounds like "TXNK" but not as "TKNK".
      Typo in c script changed from "TH:O" (upcased "o") to "TH:0" (zero).


   nmDoubleMetaphone
      Syntax: s:MetaphoneString = nmDoubleMetaphone (s:String, i:Length)

      This function returns a list of two key coded strings separated by @TAB delimiter.

      Note:
      This implementation is based on the PHP code from Stephen Woodbridge <woodbri@swoodbridge.com>,
      which incorporates several bug fixes courtesy of Kevin Atkinson <kevina@users.sourceforge.net>,
      which is based heavily on the C implementation by Maurice Aubrey <maurice@hevanet.com>,
      which in turn is based heavily on the C++ implementation by Lawrence Philips.


   nmPhonex
      Syntax: s:PhonexString = nmPhonex (s:String)


   nmGuthMatch
      Syntax: i/s:GuthMatchValue = nmGuthMatch (s:String1, s:String2, i:GuthMatchMode)
              GuthMatchMode = 1 ==> i:BooleanValue 0..1
              GuthMatchMode = 2 ==> i:PercentageValue 0..100
              GuthMatchMode = 3 ==> s:"BooleanValue@TABPercentageValue"


   nmLevenshtein
      Syntax: i:LevenshteinValue = nmLevenshtein (s:String1, s:String2)


   nmIsAbbrev
      Syntax: i:isAbbrevValue = nmIsAbbrev (s:String1, s:String2, i:Length)


   nmIsConsonant
      Syntax: i:IsConsonantValue = nmIsConsonant (s:String, i:CharPosition)


   nmIsVowel
      Syntax: i:isVowelValue = nmIsVowel (s:String, i:CharPosition, i:VowelYMode)

---------------------------------------------------------------------------------------------------
   No warranty at all. Use it on your own risk. Feel free to return feedback.
---------------------------------------------------------------------------------------------------


Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

xMT - Miscellaneous Tools

Author:
   Detlev Dalitz

Version:
   20031102
   FILEVERSION    34011
   PRODUCTVERSION 10011

Download:
   Setup package  xmt34i.v34011.zip  105 KB
   Setup package  xmt34i.v34010.zip  105 KB

Usage:
   AddExtender("xmt34i.dll")


---------------------------------------------------------------------------------------------------
   WinBatch Extender "xmt34i.dll"

   (c) Detlev Dalitz.20030208
---------------------------------------------------------------------------------------------------

   The "xMT Miscellaneous Tools Extender" contains:


 - String related functions

   mtStrLeft
      Syntax: s:LeftString = mtStrLeft (s:String, i:Length, s:PadString)

   mtStrRight
      Syntax: s:RightString = mtStrRight (s:String, i:Length, s:PadString)

   mtStrTrimLeft
      Syntax: s:LeftTrimmedString = mtStrTrimLeft (s:String)

   mtStrTrimRight
      Syntax: s:RightTrimmedString = mtStrTrimRight (s:String)

   mtStrReverse
      Syntax: s:ReversedString = mtStrReverse (s:String)

   mtStrCenter
      Syntax: s:CenteredString = mtStrCenter (s:String, i:Width, s:PadString)

   mtStrCapitalize
      Syntax: s:CapitalizedString = mtStrCapitalize (s:String, s:CharsToUpcase, s:DelimiterChars)

   mtStrTranslate
      Syntax: s:TranslatedString = mtStrTranslate (s:String, s:TabOut, s:TabIn, s:PadChar)

   mtAddBackslash
      Syntax: s:PathString = mtAddBackslash (s:PathString)

   mtRemoveBackslash
      Syntax: s:PathString = mtRemoveBackslash (s:PathString)

   mtGetLongPathname
      Syntax: s:PathString = mtGetLongPathname (s:PathString)

   mtGetShortPathname
      Syntax: s:PathString = mtGetShortPathname (s:PathString)

   mtGetTempFolder
      Syntax: s:Pathname = mtGetTempFolder ()

   mtIsAbbrev
      Syntax: i:isAbbrevValue = mtIsAbbrev (s:String1, s:String2, i:Length)

   mtIsConsonant
      Syntax: i:IsConsonantValue = mtIsConsonant (s:String, i:CharPosition)

   mtIsVowel
      Syntax: i:isVowelValue = mtIsVowel (s:String, i:CharPosition, i:VowelYMode)

   mtItemReverse
      Syntax: s:Itemlist = mtItemReverse (s:Itemlist, s:DelimiterChar)

   mtPrintf
      Syntax: s:String = mtPrintf (s:FormatString [, i/f/s:Arg1 [, ... [, i/f/s:Arg15]]])



 - Cryptographic and Hash related functions

   mtStrROT13
      Syntax: s:EncodedString = mtStrROT13 (s:String)
      Syntax: s:DecodedString = mtStrROT13 (s:EncodedString)

   mtStrUrlEncode
      Syntax: s:UrlEncodedString = mtStrUrlEncode (s:String)

   mtStrUrlDecode
      Syntax: s:UrlDecodedString = mtStrUrlDecode (s:UrlEncodedString)

   mtStrEncode64
      Syntax: s:EncodedString = mtStrEncode64 (s:String [, i:LineLength])
         LineLength > 0    : Add one @CRLF at end of each line
                             (character group of LineLength/4 size),
                             and add one @CRLF at end of encoded string.
         LineLength <= 0   : No change to the encoded string.
         LineLength ommited: No change to the encoded string.

   mtStrDecode64
      Syntax: s:DecodedString = mtStrDecode64 (s:EncodedString)

   mtStrEncode64FromFile
      Syntax: s:EncodedString = mtStrEncode64FromFile (s:Filename [, i:LineLength])
         LineLength > 0    : Add one @CRLF at end of each line
                             (character group of LineLength/4 size),
                             and add one @CRLF at end of encoded string.
         LineLength <= 0   : No change to the encoded string.
         LineLength ommited: No change to the encoded string.
         Can read binary zeroes from diskfile.

   mtStrDecode64ToFile
      Syntax: iFileSize = mtStrDecode64ToFile (s:EncodedString, s:Filename)
         Can write binary zeroes to diskfile.

   mtStrChecksum
      Syntax: i/s:ChecksumValue = mtStrChecksum (s:String, i:ChecksumMode)
         ChecksumMode = 1 ==> CRC16 Integer Number
         ChecksumMode = 2 ==> CRC16 Hexadecimal String
         ChecksumMode = 3 ==> CRC32 Integer Number
         ChecksumMode = 4 ==> CRC32 Hexadecimal String

   mtIsPrime
      Syntax: i:IsPrimeValue = mtIsPrime (i:Number)

   mtGetPrimeThisOrNext
      Syntax: i:PrimeNumber = mtGetPrimeThisOrNext (i:Number)



 - Other functions

   mtExtenderVersion
      Returns extender related information.

      Syntax:
         i:Number = mtExtenderInfo (i:Request)

            Request = 0 ==> Version
            Request = 1 ==> Total Functions
            Request = 2 ==> Total Constants


   mtRoundBy
      Syntax: i:RoundedNumber = mtRoundBy (i:Number, i:Rounddivisor)


   mtGUID
      Syntax: s:GUIDString = mtGUID ([Mode])

         Mode = 0  ==> GUID String as is (default).
         Mode = 1  ==> GUID String without curly brackets.
         Mode = 2  ==> GUID String without hyphens.
         Mode = 3  ==> GUID String without curly brackets and without hyphens.


   mtIIF
      Syntax: i/s:Value = mtIIF (i/s:Condition, i/s:TrueValue, i/s:FalseValue)


---------------------------------------------------------------------------------------------------
   No warranty at all. Use it on your own risk. Feel free to return feedback.
---------------------------------------------------------------------------------------------------


Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

xCAM - Content Addressable Memory

Author:
   Detlev Dalitz
   Marty Williams (The first WinBatch CAM code.)

Version:
   20031101
   FILEVERSION 34032
   PRODUCTVERSION 10032

Download:
   Setup package  xcam34i.v34032.zip  172 KB

Usage:
   AddExtender("xcam34i.dll")

-------------------------------------------------------------------------------

 WinBatch Extender 'xCAM Content Addressable Memory' (xCAM34i.dll)

 (c)20030215.Detlev Dalitz
 Portions copyright by Marty Williams, WinBatch, Wilson Window Ware.
 Portions copyright by Alan Kreutzer.

-------------------------------------------------------------------------------

 The WinBatch 'xCAM' extender provides keyword addressable
 storage in an efficient manner.

 'xCAM' uses a hash algorithm to utilize direct access to
  a WinBatch array cell by a given KeyValue, which can be of
  datatype integer, float or string.

 'xCAM' can reduce the cost of data access to about O(1).

 The minor disadvantage of the excellent access quality is the fact,
 that a CAM array is designed to need as twice as much memory as there are
 Key-Data pairs to be stored.


 Additional you find in this extender some array related tools
 that can enhance your productivity when working with WinBatch arrays,
 for example array functions for loading and unloading
 and various sort functions, array merge, shrink and extract function.

-------------------------------------------------------------------------------

Overview

  Functions
     camExtenderInfo
     camInit
     camCheck
     camPut
     camGet
     camKeyList
     camDataList
     camCAMFromArray
     camCAMToArray
     camArraySort       *
     camArrayFileGet    *
     camArrayFilePut    *
     camArrayFromList   *
     camArrayToList     *
     camArrayFromFile   *
     camArrayToFile     *
     camArrayFlip       *
     camArrayMerge      *
     camArrayShrink     *
     camArrayRange      *
     camArrayRangeCast  *
     camArrayRangeFill  *
     camArrayRangeMath  *
     camArrayPrintf     *
     camGUID
     camUrlEncode
     camUrlDecode
     camGetDelim
                        * = For use with standard WinBatch arrays.

  Constants
     @INSERTSORT
     @SHELLSORT
     @QUICKSORT
     @SORT_INSERTSORT
     @SORT_SHELLSORT
     @SORT_QUICKSORT
     @MATH_COUNT
     @MATH_MIN
     @MATH_MAX
     @MATH_SUM
     @MATH_SUM_SQ
     @MATH_MEAN
     @MATH_SUM_SQ_MEAN_DEV
     @MATH_VAR
     @MATH_STD_DEV
     @MATH_VAR_N
     @MATH_STD_DEV_N
     @CAST_ANY_TO_UNDEF
     @CAST_ANSI_TO_OEM
     @CAST_OEM_TO_ANSI
     @CAST_STR_TO_LOWER
     @CAST_STR_TO_UPPER
     @CAST_STR_TO_NUM
     @CAST_NUM_TO_STR
     @CAST_INT_TO_FLOAT
     @CAST_FLOAT_TO_INT
     @CAST_INT_TO_BIN
     @CAST_BIN_TO_INT
     @CAST_INT_TO_OCT
     @CAST_OCT_TO_INT
     @CAST_INT_TO_HEX
     @CAST_HEX_TO_INT

-------------------------------------------------------------------------------

 The "xCAM  Content Addressable Memory Extender" contains:


 - camExtenderInfo
      Returns extender related information.

      Syntax:
         i:Number = xmtExtenderInfo (i:Request)

            Request = 0 ==> Version
            Request = 1 ==> Total Functions
            Request = 2 ==> Total Constants


 - camInit
      Returns a special designed WinBatch array to use as a CAM storage.

      Syntax:
         a:CAMArray = camInit (i:MaxItems)

            MaxItems = Max number of items to store.
                       From 1 to 2**16 to maybe approx. limit 2**31 ?


 - camCheck
      Returns a boolean value which indicates
      if the given array seems to be a valid CAM array.

      Syntax:
         i:BooleanValue = camCheck (a:CAMArray)


 - camPut
      Puts a key-data pair into the CAM storage.

      Syntax:
         i/s:ResultValue = camPut (a:CAMArray, i/f/s:KeyValue, i/f/s:DataValue)

         Returning ResultValue can be:
            ResultValue = 1            (Put process was successful)
            ResultValue = "*EOF*CAM"   (Error while put process or error in input parameters)

      Note: Keys are stored in a CAM array in lower case (case insensitive).


 - camGet
      Returns the data value for a given key value.

      Syntax:
         i/f/s:DataValue = camGet (a:CAMArray, i/f/s:KeyValue)


 - camKeyList
      Creates an Itemlist from key values stored in CAM array.

      Syntax:
         s:Itemlist = camKeyList (a:CAMArray, s:DelimChar, i:ListMode)

         - ListMode = 0 ==> No  trailing delimiter.
         - ListMode = 1 ==> Add trailing delimiter.

      Example:
         camKeyList (CAMarray, "|", 1)

            takes a CAM array with keyvalue/datavalue pairs:
                key  data
               +---+--------+
               ! 2 ! pear   !
               ! 1 ! apple  !
               ! 3 ! banana !
               !---+--------+

            gives a string:
               "2|1|3|"

         The keys are returned in a random order.
         A simple ItemSort can sort them (if needed).


 - camDataList
      Creates an Itemlist from data values stored in a CAM array.

      Syntax:
         s:Itemlist = camDataList (a:CAMArray, s:DelimChar, i:ListMode)

         - ListMode = 0 ==> No  trailing delimiter.
         - ListMode = 1 ==> Add trailing delimiter.

      Example:
         camDataList (CAMarray, "|", 1)

            takes a CAM array with keyvalue/datavalue pairs:
                key  data
               +---+--------+
               ! 2 ! pear   !
               ! 1 ! apple  !
               ! 3 ! banana !
               !---+--------+

            gives a string:
               "pear|apple|banana|"

         The keys are returned in a random order.
         A simple ItemSort can sort them (if needed).


- camCAMFromArray
      Creates a CAM array from a normal Dim1 or Dim2 array.

      Syntax:
         a:CAMArray = camCAMFromArray (a:Array, i:KeyColumn, i:DataColumn)

         If parameter i:DataColumn is less than zero (-1),
         then the CAM array's DataValue will be filled with an integer number,
         that is the corresponding row number of the input array.


- camCAMToArray
      Creates a normal Dim2 array from a CAM array.
      Provides deloading functionality into array
      (like camKeyList and camDataList into string).

      Syntax:
         a:Array = camCAMToArray (a:CAMArray)


- camArrayToFile
      Dumps an array to a special designed array dump textfile.

      Syntax:
         i:BooleanValue = camArrayToFile (a:Array, s:Filename)

      File access rights must be create, write, read.

      Note: Not limited to CAM arrays, can be used with WinBatch arrays in general.


 - camArrayFromFile
      Creates an array from a special designed array dump textfile.

      Syntax:
         a:Array = camFileToArray (s:Filename)

      Note: Not limited to CAM arrays, can be used with WinBatch arrays in general.


 - camArraySort
      Performs a sort on a WinBatch array.
      Array can have up to 5 dimensions, but will be sorted in Dim-1 column only.
      Other dimensions remain joined.

      Offers three different sort algorithms:
      - InsertSort ... for small arrays.
      - ShellSort  ... for large arrays.
      - QuickSort  ... for big arrays.

      Syntax:
         i:BooleanValue = camArraySort (a:Array, i:SortMethod, i:SortDirection, i:MatchCase)

         SortMethod    = @INSERTSORT (0)
         SortMethod    = @SHELLSORT  (1)
         SortMethod    = @QUICKSORT  (2)

         SortDirection = @ASCENDING  (0)
         SortDirection = @DESCENDING (16)

         MatchCase     = @FALSE (0)
         MatchCase     = @TRUE  (1)

         Returns:
         (Array in-place sorted)
         BooleanValue  = @FALSE ==> Error on sort time or wrong parameters.
         BooleanValue  = @TRUE  ==> Sort was successful.

      Note: Use camArraySort to sort standard WinBatch arrays only.

      Note: Do never sort a CAM array. Sorting would corrupt the entire CAM array.


 - camArrayFileGet
      Reads a textfile and returns a Dim1 array.
      Each array element contains one line of the given input file,
      with EndOfLine characters stripped off.

      The BaseMode parameter controls the creation
      of a zero based or a one based Array.

      The array contains n elements (zero based)
      resp. n+1 elements (one based),
      with n = Number of File lines.

      After returning from this function the number of file lines read
      can be retrieved by 'LineCount = ArrInfo(Array,1) - BaseMode'.

      Syntax:
         a:Array = camArrayFileGet (s:Filename, i:Basemode)

         BaseMode = 0  = zero based array
         BaseMode = 1  = one  based array


 - camArrayFilePut
      Writes an array to textfile (only column Dim1) .
      Each array element is one line in textfile.
      EndOfLine character is a CRLF sequence.

      The iBaseMode parameter controls how the array is readout,
      starting with element 0 if array is zero based or
      starting with element 1 if array is one based.

      Syntax:
         i:BooleanValue = camArrayFilePut (a:Array, s:Filename, i:BaseMode)

         BooleanValue = @TRUE  = 1  on success.
         BooleanValue = @FALSE = 0  on failure.

         File access rights must be create, write, read.


 - camArrayFromList
      This function takes a delimited list, and creates a one- or more-dimension
      array with the same number of elements as the number of items in the list,
      setting each element to the value of the corresponding item in the list.
      It converts a delimited list to an array of Dim1..Dim5 depending
      on the delimiter chars which can be defined accordingly.
      Mostly it will be used to create Dim2 tables.

      This function is the counterpart to "camArrayToList".

      Syntax:
         a:Array = camArrayize (s:String, s:DimDelimChars, i:Mode)

         Mode = 1 ==> Acts like standard WinBatch Arrayize function.
                      Respects trailing delimiter and adds empty array item.

                      For example:
                      Arrayize("test.",".") converts a WinBatch list
                      of two items, delimited by a point character.
                      This gives an Dim1-array with two array elements.

         Mode = 0 ==> Discard trailing empty item.

      Example:
         camArrayFromList ("1|apple|1.10@2|pear|2.20@3|banana|3.30@", "@|", 0)

            gives an array 3x3:
               +---+--------+-------+
               ! 1 ! apple  ! 1.10  !
               ! 2 ! pear   ! 2.20  !
               ! 3 ! banana ! 3.30  !
               !---+--------+-------+


 - camArrayToList
      This function creates a delimited list from a one- or multi-dimension
      array with the same number of items as the number of elements in the array,
      setting each list item to the value of the corresponding array element.
      Delimiter chars can be choosen by the user.

      This function is the counterpart to "camArrayFromList".

      Syntax:
         s:String = camArrayToList (a:Array, s:DimDelimChars, i:Mode)

         Mode = 1 ==> Add trailing Dim1-delimiter.
         Mode = 0 ==> No  trailing Dim1-delimiter.

      Example:
         camArrayToList (array, "@|", 1)

            takes an array 3x3:
               +---+--------+-------+
               ! 1 ! apple  ! 1.10  !
               ! 2 ! pear   ! 2.20  !
               ! 3 ! banana ! 3.30  !
               !---+--------+-------+

            gives a string:
               "1|apple|1.10@2|pear|2.20@3|banana|3.30@"


 - camArrayFlip
      Swaps row (Dim1) and column (Dim2) of an array, creating a new Dim2 array.

      Syntax:
        a:ArrayB = camArrayFlip (a:ArrayA)

        Example:
           Given array 4x3:

                  B0  B1       B2
                +---+--------+-------+
             A0 ! 1 ! apple  ! 1.10  !
             A1 ! 2 ! pear   ! 2.20  !
             A2 ! 3 ! prune  ! 3.30  !
             A3 ! 4 ! banana ! 4.40  !
                !---+--------+-------+

           Returns an array 3x4:

                  B0      B1     B2      B3
                +-------+------+-------+--------+
             A0 ! 1     ! 2    ! 3     ! 4      !
             A1 ! apple ! pear ! prune ! banana !
             A2 ! 1.10  ! 2.20 ! 3.30  ! 4.40   !
                +-------+------+-------+--------+


- camArrayMerge
      Creates a Dim2-array by merging two Dim1- or Dim2-arrays.

      Merging means, that 'columns' of array B are inserted into array A.
      The columns to be inserted can be a consecutive range of columns
      starting at a specified start column with count column width.

      The new array will be proper sized to take over all elements
      from the specified columns.

      Syntax:
         a:Array = camArrayMerge (a:ArrayA, i:InsertCol, a:ArrayB, i:StartCol, i:Count)


 - camArrayShrink
      Deletes one or more columns from a Dim2-array.

      If deletion of an an entire Dim2 vector occurs, then the function
      returns a Dim1-array with one element of undefined vartype.

      Syntax:
        a:Array = camArrayShrink (a:ArrayA, i:StartCol, i:Count)


 - camArrayRange
      Extracts a specified region of cells from a given array,
      creating a new array.

      Syntax:
        a:ArrayB = camArrayRange (a:ArrayA, s:RangeMaskFrom, s:RangeMaskTo)

        RangeMask is a comma delimited list of integer numbers,
        referring to an array coordinate.

        An asterisk can be used as a placeholder in each dimension
        to force using subranges of cells, that means using of indexes
        in a range from lower bound resp. to upper bound of the specified dimension.

           Given array 3x3:

                  B0  B1       B2
                +---+--------+-------+
             A0 ! 1 ! apple  ! 1.10  !
             A1 ! 2 ! pear   ! 2.20  !
             A2 ! 3 ! banana ! 3.30  !
                !---+--------+-------+

        Example 1:
           RangeMaskFrom = "1,1"
           RangeMaskTo   = "2,2"

           Returns an array 2x2:

                  B0       B1
                +--------+-------+
             A0 ! pear   ! 2.20  !
             A1 ! banana ! 3.30  !
                !--------+-------+


        Example 2:
           RangeMaskFrom = "*,1"   ("*" ==> from element A[lower bound])
           RangeMaskTo   = "*,1"   ("*" ==> to element   A[upper bound])

           Returns an array 1x3:

                +--------+
             A0 ! apple  !
             A1 ! pear   !
             A2 ! banana !
                !--------+


        Example 3:

           RangeMaskFrom = ""   (Note: "" is the same as "*,*,*,*,*")
           RangeMaskTo   = ""

           Returns a full copy of the given array.


 - camArrayRangeCast
      Performs typecasting on the specified region of cells.

      Syntax:
        i:Result = camArrayRangeCast (a:ArrayA, s:RangeMaskFrom, s:RangeMaskTo, i:CastMode)

        CastMode:
        @CAST_ANY_TO_UNDEF  (=0)
        @CAST_STR_TO_NUM    (=1)
        @CAST_NUM_TO_STR    (=2)
        @CAST_FLOAT_TO_INT  (=3)
        @CAST_INT_TO_FLOAT  (=4)


 - camArrayRangeFill
      Fills the specified region of cells with the same value of integer, float or string.

      Syntax:
        i:Result = camArrayRangeFill (a:ArrayA, s:RangeMaskFrom, s:RangeMaskTo, ifs:Value)


 - camArrayRangeMath
      Performs statistical related math functions on the specified region of cells.
      Returns a WinBatch Dim1-array of 11 elements, which contains the set of
      result values solved by the implemented statistical math functions.

      Syntax:
        a:ArrayB = camArrayRangeMath (a:ArrayA, s:RangeMaskFrom, s:RangeMaskTo)

      Math functions:
      @MATH_COUNT            (=0)  Count                            (=Anzahl)
      @MATH_MIN              (=1)  Min                              (=Minimum)
      @MATH_MAX              (=2)  Max                              (=Maximum)
      @MATH_SUM              (=3)  Sum                              (=Summe)
      @MATH_SUM_SQ           (=4)  Sum of Squares                   (=Summe der Quadrate)
      @MATH_MEAN             (=5)  Mean                             (=Mittelwert)
      @MATH_SUM_SQ_MEAN_DEV  (=6)  Sum of Squared Mean Deviation    (=Summe der quadrierten Abweichungen vom Mittelwert)
      @MATH_VAR              (=7)  Variance N-1                     (=Varianz (N-1))
      @MATH_STD_DEV          (=8)  Standard Deviation N-1           (=Standardabweichung (N-1))
      @MATH_VAR_N            (=9)  Variance N                       (=Varianz (N))
      @MATH_STD_DEV_N        (=10) Standard Deviation N             (=Standardabweichung (N))


 - camArrayPrintf
      The function formats and stores a series of array values and additional literals into a string.
      The returning string is formatted accordingly to the corresponding
      format specification in the format string.
      The function works much like the native windows C runtime printf function.

      Syntax:
        s:String = camArrayPrintf (a:ArrayA, s:FormatString)


 - camGUID
      Returns a GUID string.

      Syntax:
         s:GUIDString = camGUID ()


 - camUrlEncode
      Returns an UrlEncoded string.
      Translation of special characters into their hexadecimal representation,
      e.g. @TAB (which is a Num2Char(9)) becomes "%09".

      Syntax:
         s:UrlEncodedString = camUrlEncode (s:String)


 - camUrlDecode
      Returns an UrlDecoded string.
      Translation of hexadecimal character representation into char value,
      e.g. "%09" becomes @TAB.

      Syntax:
         s:UrlDecodedString = camUrlDecode (s:UrlEncodedString)


 - camGetDelim
      Returns a set of reasonable delimiter characters depending on the given input string.
      The set of delimiter characters can be presented in a string variable or in an array variable.

      Syntax:
         s/a:Delimiter = camGetDelim (s:String, i:Count, i:Mode [, s:Default]


 - Constants:
      @INSERTSORT             (=0)
      @SHELLSORT              (=1)
      @QUICKSORT              (=2)
      @SORT_INSERTSORT        (=0)
      @SORT_SHELLSORT         (=1)
      @SORT_QUICKSORT         (=2)
      @MATH_COUNT             (=0)
      @MATH_MIN               (=1)
      @MATH_MAX               (=2)
      @MATH_SUM               (=3)
      @MATH_SUM_SQ            (=4)
      @MATH_MEAN              (=5)
      @MATH_SUM_SQ_MEAN_DEV   (=6)
      @MATH_VAR               (=7)
      @MATH_STD_DEV           (=8)
      @MATH_VAR_N             (=9)
      @MATH_STD_DEV_N         (=10)
      @CAST_ANY_TO_UNDEF      (=0)
      @CAST_ANSI_TO_OEM       (=1)
      @CAST_OEM_TO_ANSI       (=2)
      @CAST_STR_TO_LOWER      (=3)
      @CAST_STR_TO_UPPER      (=4)
      @CAST_STR_TO_NUM        (=5)
      @CAST_NUM_TO_STR        (=6)
      @CAST_INT_TO_FLOAT      (=7)
      @CAST_FLOAT_TO_INT      (=8)
      @CAST_INT_TO_BIN        (=9)
      @CAST_BIN_TO_INT        (=10)
      @CAST_INT_TO_OCT        (=11)
      @CAST_OCT_TO_INT        (=12)
      @CAST_INT_TO_HEX        (=13)
      @CAST_HEX_TO_INT        (=14)

-------------------------------------------------------------------------------
 No warranty at all. Use it on your own risk. Feel free to return feedback.
-------------------------------------------------------------------------------



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

TForm - TimeForm extender

Author:
   Alan Kreutzer

Version:
   20010523
   FILEVERSION 10000
   PRODUCTVERSION 10000

Download:
   tform34i.zip  30 KB

Usage:
   AddExtender("TForm34i.dll")

-------------------------------------------------------------------------------

The TimeForm extender returns a time in any format you wish.

To load the extender...   AddExtender(TForm34i.dll")
There are two function calls...

   xFormatNow("format")
   xFormatTime(YmdHms,"Format")

   where       "Format"   is a string describing the format the
                          date is to be returned in.

                 YmdHms   is a date /time in WinBatch format (YYYY:MM:DD:HH:MM:SS)
                          (Four digit years are recommended.  Two digit years are
                          assumed to be 20xx)


Both routines return a string containing the date,
formated as directed by the "Format".


The format can contain any characters. The routines look for
certain key strings and replace them with information from the
date.  NOTE:  KEY STRINGS ARE CASE SENSITIVE.

The key strings are...


                This     Is replaced by
                ----     -----------------------------------
(Upper Case)    MMMM     Full Month Name
                MMM      Abbreviated Month Name
                MM       Month as a two digit number
                DDDD     Full Weekday name
                DDD      Abbreviated Weekday name
                DD       Day of the month as a two digit number
                YYYY     Four Digit year
                YY       Two Digit Year
                HH       Hour (24 hour format) as a two digit number
(Lower Case)    hh       Hour (12 hour format) as a two digit number
                mm       Minutes as a two digit number
                ss       Seconds as a two digit number
(Upper Case)    AM       AM/PM  (Upper case)
(Lower Case)    am       am/pm  (Lower case)
(Upper Case)    ZM       Two digit month with leading zero suppressed
                ZD       Two digit day of the month with leading zero suppressed.
                ZH       Two digit hour (24 hour format) leading zero suppressed.
                zh       Two digit hour (12 hour format) leading zero suppressed.
(Lower Case)    zm       Two digit minute with leading zero suppressed
                zs       Two digit second with leading zero suppressed
(Upper Case)    JJJ      Julian Day  - Day of the year as a three digit number

             Note that JJJ does NOT return the same value as the Winbatch function
             TimeJulianDay().  TimeJulianDay() returns the number of days since the
             year 1AD, but NowFunction("JJJ") returns the number of days since
             the beginning of this year.



Any other characters in a Format will be passed to the
output string unchanged.  This is useful for putting
punctuation in a date...   MM/DD/YYYY  HH:mm:ss


Examples...

     xFormatNow("DDDD, MMMM DD, YYYY")

              would return a date like this.....   "Saturday, January 01, 2000"

     xFormatNow("hh:mm:ss am")

              would return.....   "05:15:33 pm"

     xFormatTime("YYYYMMDD",FileYmdHms(aFileName))

         Would return a file date like this... "20010131"

-------------------------------------------------------------------------------



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

The Watcher Extender

Author:
   Alan Kreutzer

Version:
   20030428
   FILEVERSION 10100
   PRODUCTVERSION 10100

Download:
   Watcher.zip  43 KB

Usage:
   AddExtender("Watch34i.dll")

-------------------------------------------------------------------------------

The Watcher extender allows a WinBatch program to monitor up to ten windows directories.

It will wait until a file in one of the directories is created or modified,
and then returns with the name of the file.

The watcher extender defines the following calls.

    WatchVersion   Returns version number of the extender.
    WatchOpen      Tell the extender which directories to watch.
    WatchWait      Wait until a file is changed or created.
    WatchClose     Stop watching the directories.

The extender also defines several constants.

This extender is recommend for watching small directories.
To identify changed files, it must a list of all the existing files in memory,
and must scan the entire directory whenever a change occurs.
For small directories this has very little impact on the system,
but for very large directories the Watcher could use a significant amount
of system memory and processor resources.

-------------------------------------------------------------------------------



Seitenanfang/TopOfPage Seitenende/EndOfPage
Seitenanfang/TopOfPage Seitenende/EndOfPage

The RC4 Extender

Author:
   Alan Kreutzer

Version:
   January 2004
   FILEVERSION 3.00.00
   PRODUCTVERSION 3.00.00

Download:
   rc4.zip  63 KB

Usage:
   AddExtender("rc434i.dll")

-------------------------------------------------------------------------------

The RC4 extender is used to encrypt or decrypt a line of text using RC4 encryption.

When RC4 scrambles a string the result may contain binary values.
These values cannot be saved in a WinBatch string variable.
To allow WinBatch to do encryption, the scrambled value is returned as a string
of hexadecimal numbers.
(Since each byte of a string requires two hexadecimal digits,
the output will be twice as long as the plain text.)
The decryption expects its input to be in this same hexadecimal notation.

Another option is to encrypt and decrypt in a binary buffer.
Since a binary buffer can contain any data there is no need to
"hexadecimalize" the encrypted text.
However, you can only manipulate the data in the buffer,
you cannot copy it to a string variable.


rc4encrypt (PlainText, Key)
rc4decrypt (EncryptedText, Key)
rc4binary  (Pointer, Key)

-------------------------------------------------------------------------------



Page Date
2004-05-18
DD-Software
Kapitel zurück / previous Chapter
Main Index
 
Seite zurück / previous page
Backward
Seite vor / next page
Forward
 
Seitenanfang/TopOfPage
Top
Seitenende/EndOfPage
Bottom
MyWbtHelp current version