Standard To Pro Converter

Steve Boothman aka bevets June 2004




How To Use
What can it convert.

Revision History











How to use

First off this is a Standard Source to Pro Source converter it is not a Pro to Standard converter or a half Standard half Pro source converter trying to use this on Pro source code is definately not recommended.

Press Load button and select a IBasic Standard File.

Press the Convert Button to start conversion.

Press the Convert Button again to abort conversion.

Press Save button to save the converted file (Prompted for file name)

(Don't overwrite your original just in case :)

You can also cut and paste the code from either Control.

To convert pasted code, paste it into the Standard source edit control and select the Convert Button.

Context Menu's are available on both Edit Controls for more functions.

Double Clicking Splitter Bar will recenter it.

Right clicking on Splitter Bar will change it's style.





What can it convert ?

Converts Window and Dialog commands adds '&' to handler name.
Converts Control commands.
If you have a Groupbox or Checkbox in the code you may get a requestor asking which you want, because they both use 'C' as the control type.
Converts Menu commands.
Converts InsertMenu commands.
Converts ContextMenu commands
Converts Instr commands not heavily tested but converted what i threw at it
eg: If Instr(someVar,Left$(textVar,Len(otherVar)+5),Chr$(13)+Chr$(10))
to  If Instr(Left$(textVar,Len(otherVar)+5),Chr$(13)+Chr$(10),someVar)
Adds EndSub to end of subroutines.
Converts Chr$() function to escape sequences for \n \t \"
Converts ,, or , , to ,0, in Control definitions
Converts LoadToolBar
Converts Case to Case&
Converts AttachBrowser
Converts ControlCMD
Converts BrowseCMD
Converts ??: to Sub ??
Converts Tabs To Spaces

Changes the Case of KeyWords contained in CaseFile.txt

All the above can be turned off or on.

Works with code done in a structured style.
Amongst over things this means one keyword command per line, menu definitions not using variables etc.

If you try it and it dosen't work for your style of coding
then email me a part of the code that didn't convert and
i'll see what i can do with it.

It dosen't convert all the changes necessary but it's a start.

I have a Standard source file with over 100 Control statements
and it converts them in under a second.

CaseFile.txt is just a normal text file with a list of KeyWords that S2P will search for and change to the same case as what is in the file or optionally upper or lower case.





Revision History

'version 0.10
'Standard To Pro bevets@speedlink.com.au 29/12/2003
'Updated 31/12/03 version 0.11
'Reworked the Control converting routine
'Added About Box
'Updated 31/12/03 version 0.12
'Added ContextMenu Support
'Reworked the Dialog converting routine
'Reworked the Control converting routine again
'Updated 2/01/04 version 0.13
'Added Instr conversion
'Added pasted text converting
'Added &H to 0x conversion
'Fancied up the About Dialog (a break from doing the Instr routine :)
'Updated 4/01/04 version 0.14
'Added Append$ conversion
'Added Chr$() conversion for \n \t \"
'Added automated Groupbox Checkbox selection if it can determine it,
'      otherwise a requestor pops up asking you which one it should be
'Added Menu's to GUI
'increased amount of code that can be pasted into Edit Control
'Increased memory buffer size
'Updated 4/01/04 version 0.15
'Changed to a window from a dialog
'Removed top buttons you can now grab between the controls
'Updated 7/01/04 version 0.16
'Added backslash conversion
'Added replace ,, or , , in Controls to ,0,
'Updated 02/02/04 version 0.20
'changed to Rich Edit Controls
'modified or added code is now coloured blue
'lines beginning with ' coloured green
'added staus window displaying line num, column num and ASC code of current char
'added context menu's for cut, copy, paste etc
'Updated 3/02/04 version 0.21
'added search to context menu
'hopefully fixed bug thats been bugging me for weeks
'fixed bug for ControlCmd commands
'Updated 6/02/04 version 0.22
'added ability to abort conversion
'fixed crashing bug once and for all (i hope)
'changed about window to dialog
'added option for Pro source to be displayed in bold (on by default)
'Updated 7/02/04 version 0.25
'removed buttons load, convert, save
'added toolbar controls
'Updated 12/02/04 version 0.26
'added print option
'added current filename and path to caption
'added LoadToolBar conversion
'added ini file to remember option settings & last directory
'added ability to change from small toolbar buttons to big ones
'fixed Append$ bug
'fixed curly bracket bug, rich edit needs it to be escaped \{ or \}
'Updated 15/02/04 version 0.27
'added case to case&
'added remove blank lines
'Updated 18/02/04 version 0.28
'added AttachBrowser conversion
'added BrowseCMD conversion
'added ??: to Sub ?? conversion
'Updated 18/02/04 version 0.29
'couple of bug fixes
'added hi-lighting of changed Std code
'started adding tool tips to option checkboxes
'Updated 29/02/04 version 0.30
'completed ToolTips
'exe compressed with Petite 2.2
'Updated 03/03/04 version 0.31
'added CaseFile.txt to startup directory
'added menu to edit CaseFile.txt with notepad
'Updated 12/03/04 version 0.33
'fixed bug in search routine
'added menu to save pro source as rich text file
'added font selection
'added tabs to spaces conversion
'removed / to // option
'removed Append$ option
'removed bold pro text option
'Updated 14/06/04 version 1.00
'added uppercase or lowercase to casefile options
'changed the splitter, double clicking on it will recenter it.
'changed the gui slightly moved progress bar to status window.
'compiled with the latest version of IBasic Pro
'included manifest file for XP
'Updated 19/06/04 version 1.02
'fixed a few cosmetic bugs
'added option to use horizontal splitter bar
'right clicking on splitter bar will change it
'double clicking on splitter bar will center it