COMMENTER - 
PowerBuilder 5.0 Comment Block Generator

Advent 2000, Inc.
http://www.advent2000.com

Version 1.0.00 - Initial release
---------------------------------------------------------
Version 1.0.01
- Blank lines are now supported in the comment header
- New option: commentr.exe /i - inserts an inline comment block 
  and positions the cursor in the middle of the block  /* _ */ 
- New option: commentr.exe /c - inserts a custom comment block 
- Three up arrows will be done after inserting a comment block
 
Thanks to Jon Credit for contributions.
---------------------------------------------------------
Version 1.0.02

Change the external call declarations to accomodate the restrictions 
in the 5.0.03 FindWindowA() API call.  In 5.0.03 it is not allowed to 
pass Null string arguments.  Instead a ulong with a 0 value can be passed.  

The workaround is to declare three versions of the FinfWindowA() API:

 Function ulong FindWindowA(ref string classname, ref string windowname) Library "USER32.DLL"
 Function ulong FindWindowA(ref string classname, ref ulong windowname) Library "USER32.DLL"
 Function ulong FindWindowA(ref ulong classname, ref string windowname) Library "USER32.DLL"

In the wrapper function, determine if any of the arguments are null 
and call the appropriate function:

ulong	lu_null = 0

IF IsNull(as_classname) AND IsNull(as_windowname) THEN 
	return -1
ELSEIF IsNull(as_windowname) THEN
	return FindWindowA(as_classname, lu_null)
ELSEIF IsNull(as_classname) THEN
	return FindWindowA(lu_null, as_windowname)
ELSE
	return findwindowA(as_classname, as_windowname)
END IF


---------------------------------------------------------
Version 2.0.00

Modified to work with PB 6.0

- In the application Open event changed ls_class to 'PBFRAME60'

- Modified of_getcurrentsheet to reflect the new Z order in the Application painter.

 
---------------------------------------------------------
Freeware - use at your own risk.  
Advent 2000 is not responsible for maintenance or support,  
but we would like to hear you comments / suggestions.
Email: support@advent2000.com.
---------------------------------------------------------
Features:

 - Generates a comment header block in the script window.
 - Format customizable in the INI file
 - Initiated from a script painter toolbar
 - Does not interfere with clipboard activities
 - Automatically substitudes the keywords with the current:
	Object Name
	Event or function name
	Return type
	Current Date
		

INI file keywords:
 <objname>	- Object name
 <eventfunc>	- "Event" or "Function"
 <e/fname>	- Event or function name
 <returns>	- Return type
 <today>	- Today's date
 <>		- Tab
 <Q>		- Single quote

---------------------------------------------------------
Options:

commentr.exe - insert a comment header

commentr.exe /b - insert a comment block

commentr.exe /v - Display the current version

commentr.exe /i - insert an inline comment	New in 1.0.01

commentr.exe /c - insert a custom script	New in 1.0.01


Sample comment header:
//************************************************************
// Object: unv_extcalls
// Method: of_getactivewindow
// Author: B. Gasin
// Date  : 3/28/97
//
// Arg   :
// Return: unsignedinteger
//
// Desc  :
//
//************************************************************
// Modifications:
// Date            Author              Comments
//------------------------------------------------------------
//
//************************************************************

Sample comment block:
//************************************************************
//
//************************************************************


Sample inline comment:
/*  */

Sample custom script:
IF IsValid( gnv_app.inv_debug ) THEN
	gnv_app.inv_debug.of_message( This.ClassName() + " Function: of_getactivewindow" )
END IF

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

Instructions:

From the script painter menu select Window / Toolbars...

Select PainterBar and click Customize...

Select an appropriate picture from the custom palette and drag it to the current toolbar.

Locate the commentr.exe by clicking on the Browse... button

A separate toolbar can be set up for each command parm option
---------------------------------------------------------

Happy commenting !!!