Copyright: Copyright 1993 Software Assist Corporation


SCFILE Version 1.3

Copyright 1993 - Software Assist Corporation
 All Rights Reserved

Ever want to drop a large text file onto the Windows Notepad  just to see one line of text within it? If that text file is over 64K in size, forget it. With SCFILE you can view, search, and extract from virtually any text file you can store (actually there is a limit somewhere around 1,000,000,000 bytes).

Read on and see just how simple it is!

 Opening Files For Viewing
  Scrolling Through Files
  Searching For Text Within a File
  Copying a Portion of Your File
  Setting SCFILE Options
  Selectively Highlighting Text

  Overriding the Maximum Record Length

 Enhancements and Fixes in This Release


Opening Files For Viewing

There are five ways to open a file for viewing with SCFILE.

Perhaps the most straight forward way is to start the SCFILE application and select File/Open from the menu. You will be presented with the common, Windows file open dialog.

The second way is to pass the fully qualified name of your file as a parameter to the SCFILE command. This can be accomplished by either adding an item to program manager for SCFILE.EXE or by supplying the full command and file name to File Manager's Run menu item.

The third way is to associate SCFILE.EXE with a file extension through the File Manager Associate menu item. Then just double click on the file you want to view from File Manager.

The fourth way is to drag your file from File Manager and drop it on the SCFILE application. SCFILE's window can be either open or iconisized. If dragging and dropping is not familiar to you, make sure the SCFILE window is visible (either open or as an icon) as well as the File Manager window. From File Manager, click and hold your left mouse button on the file you want to view. Now "drag" the file over the SCFILE window and release the mouse button. That's all there is to it!

The fifth way is to click on a previously viewed file's name in the File menu. When you pull down the File menu, you will notice the names of up to 5 previously viewed files. There are a couple of things to note about this technique. If you do not Save Settings on Exit, SCFILE will not remember that last files you viewed. This may or may not be what you want to do. Another thing you will notice is that SCFILE will remember the last position you were at in the file and return you to it. If this is not what you want to do, just open the file through the Open sub-menu item.


Scrolling Through Files

SCFILE presents you with both vertical and horizontal scroll bars. These bars act pretty much as you would expect them to.

You can also use the following keys to control the scrolling of your viewing position.

Page Up	Scrolls the viewing position backward one page.
Page Down	Scrolls the viewing position forward one page.
Home	Jump to the beginning of the file.
End	Jump to the end of the file.
Up Arrow	Scroll the viewing position backward one line.
Down Arrow	Scroll the viewing position forward one line.
Left Arrow	Scroll the viewing position to the left one character.
Right Arrow	Scroll the viewing position to the right one character.


Searching For Text Within a File

With a file open for viewing, pull down the Search menu item and click Find. You will be presented with a menu that will allow you to enter the text you are searching for.

Searching proceeds from the first visible line.

If you are not sure of the exact case (as in upper/lower) of the text you are searching for, click the Ignore Case check box on the Find dialog. You should be aware that searches through very large files will run faster if the exact case is entered.

To repeat a previous search, either pull down the Search menu item and click Repeat Search or press F3.

If the text is located, the line it exists on will become the first visible line and the text will be outlined by a broken rectangle.


Copying a Portion of Your File

To copy part of your file to the Windows clipboard or to another file, you simply tell SCFILE the bounds of what you want to copy.

Find the first (or last) line you want to copy. Using your mouse's left button click on the line. The line will now be outlined by a broken rectangle.

Now find the line that represents the other bound of what you want to copy and click it with the left mouse button. That's it!

When you start SCFILE, the default destination for copy operations is the Windows clipboard. You can change this to go to a file by pulling down the CopyTo menu and clicking Destination. You will be presented with a dialog from which you can click File. This will present you with the common Windows file selection dialog. Enter the file you want the copy operations directed to. From then on (or until you change it), copy operations will append to the file you selected.

If you make a mistake in selecting your first bound, pull down the CopyTo menu and click Unmark. This will eliminate the first bound you selected.


Enhancements and fixes
Enhancements and Fixes Included in This Release

Tracking ID 	Description

00001 	Cleanup mnuSearch_Click event
00002 	Opening non-existant file should cause error
00003 	Generate Beep in SCFILER for invalid key
00006 	Move description of DLL functions to help file
00007 	Add check and warning for invalid file format
00008 	System lock up when scrolling to end
00009 	Expand tabs in lines
00010 	User selectable font and font style
00011 	User selectable foreground and background color
00012 	Save settings on exit option
00013 	Repackage enabling of menu items
00014 	Cannot set colors to black
00016 	Help when the help file is in a root directory causes error
00017 	Remember last position viewed within a file
00018 	Selectively highlight text
00019 	Generate Beep for invalid key in SCFILE
00020 	Move Share Control to Options
00022 	Opening new file should reset mark
00023 	Change mark from rectangle to reverse
00024 	SetBkMode to Opaque for all TextOut
00025 	Add RewritePicLine function
00026 	Alt key process disables scroll keys
00027 	Current highlight values not shown properly
00028 	Allow customize of MAX_REC_LEN
00029 	Move file drop process to custom control
00030 	Various prob. when lines per page*MAXREC>32K
00031 	Correct resetting of highlight filter
00032 	Correct resetting of file pos in MRU-1
00033 	Replace VB control of scroll bar with .VBX


Setting SCFILE Options

You can optionally change the font, font style, and the foreground and background colors of your text display.

Pull down the Options menu item. You will see the Font and Color sub-menu items.

The Share Control sub-menu item (if enabled) will allow your viewing to be controlled from another workstation on a Windows for Workgroups network.

If the Save Settings on Exit sub-menu item is checked, the font, font style, foreground color, background color, the size and position of the text display form, and the last files viewed as well as your last position within the files will be saved when you exit the application. If this is not what you want to do, uncheck this sub-menu item.


Setting SCFILE options
Selectively Highlighting Text

SCFILE allows you to selectively highlight text either by the line or by the string depending on whether a string occurs within a line. These highlight definitions can then be saved to a file and loaded for subsequent files. Highlight definitions are created through the Color sub-menu item under the Options menu item. As SCFILE topics go, highlighting is fairly complex but a little experimentation will get you going with no problem. A lot of things go on behind the scenes and several assumptions are made. For this reason, it is suggested that you browse through the related topics to see what is going on.

Related Topics

 Defining highlight criteria
  Loading highlight definitions
  Saving highlight definitions


Defining Highlight Criteria

Under the Color sub-menu item of the Options menu item, select the Highlights sub-menu item. This will present you with a dialog from which you can define the type of highlighting required. You can define a new highlight definition or scroll through and change existing highlight definitions.

If a line was marked on the text picture (such as beginning a copy operation), the entire marked line will appear in the text box with the current foreground and background colors.

You can create as many highlight definitions as you like although keep in mind that SCFILE will scan each definition for each line displayed. With a reasonable number of definitions, this should not be noticable.


Loading Highlight Definitions

SCFILE can load a previously  saved highlight definition and apply it to the file currently being viewed. To load a highlight definition, execute the Load Highlight Definition sub-menu item of the File menu item. Once a highlight definition has been loaded (or saved), it will become the default highlight definition for the current file's extension. In other words, for every file viewed with this file extension this highlight definition will be used if it still exists.


Saving Highlight Definitions

SCFILE can save the current set of highlight definitions to a file. To do this, execute the Save Highlight Definition or Save Highlight Definition As sub-menu item of the File menu item. Once a highlight definition is saved, it will become the default highlight definition for the current file's extension. In other words, for every file viewed with this file extension this highlight definition will be used if it still exists.


Overriding Maximum Record Length
Overriding the Maximum Record Length

Given the way SCFILE processing your text file, it is important that it know, ahead of time, what the maximum length of a record will be. By default, this value will be 255 characters. In most cases, this is sufficient. If, however, you will be processing files composed of records larger than 255, all is not lost.

Using Notepad or any other editer, modify the SCFILE.INI file located in your Windows directory. This file is created the first time you run SCFILE and updated each time you run it. After the line which reads:
[FRMMAIN]
add a line which reads:
MAXREC=xxx

In the above example, you replace "xxx" with the maximum record length you want SCFILE to use. Making this number too small will cause SCFILE to issue an error message when you open a file, indicating that the file is non-existant or is not a valid format. Making the number too large will waste a little storage.

Remember, it is better to guess high (within reason).