Contents of Article


Introduction: Standard SPFLite Startup

Editing Files using Drag-and-Drop Support

SPFLite Command Line Options

Specifying an Overriding Profile to use

Specifying an Overriding Initial Macro to use

Specifying an Overriding XFORM Macro to use

Terminating SPFLite

Terminating a Single File Tab

Terminating All Tabs


Introduction: Standard SPFLite Startup


Based on a General Options setting, you can choose to reopen any files that had been open the last time SPFLite was shut down.


If you enable "Re-Open last file(s) at Start",  then when you double-click the SPFLite icon which was created during the install, you will be presented with the same file tabs that were open the last time you used SPFLite. The File Manager will be present as the leftmost tab. The tab that was active when you shut down will be presented as the active tab when you resume. 


Note: The files will be opened in simple Edit, View or Browse Mode depending on their state at the previous shutdown.


If you have not enabled "Re-Open last file(s) at Start", you will be presented with the File Manager screen containing a directory list based on your last-used File Manager display selection.


Editing Files using Drag-and-Drop Support


You can do the following with SPFLite's Drag-and-Drop support:


    • Drag-and-Drop a file from Explorer or from the desktop onto the SPFLite icon to have it start editing with that file. The File Manager will be present as the first tab, and the edit file tab as the second one.


    • Drag-and-Drop a file onto an existing SPFLite window. If the current tab is (New) the file will be opened on that tab. If the current tab contains data, or is the File Manager tab, the dropped file will be opened in a new file tab.


    • A shortcut to a data file (rather than the file itself) may also be Dragged-and-Dropped onto SPFLite.


SPFLite Command Line Options


When started from the command line, operands for SPFLite normally include the initial filename to be edited. If SPFLite is started without a file name, the SPFLite startup will proceed as described above.


When any of the optional -XXXXX operands are coded, the path/filename operand should always be entered last. If the filename contains spaces, the operand should be enclosed in quotes.  e.g.  "My Special File"


The following command-line options are supported. Note that all options can be specified in any abbreviated form down to a single letter. e.g. -CLIP can be specified as -CLIP, -CLI, -CL or -C.


-BROWSE option


BROWSE mode allows you to use SPFLite to view data files in read-only mode without risk of changing the data. This is particularly important if you normally open files with with the Profile set to AUTOSAVE ON, or if you have opened an important file and want to be sure it does not get modified. 


In BROWSE mode, you are prevented from using any action (Primary Command, Line Command or simple typing) which would modify the file's data. 


-BROWSE  may be coded alone as an operand, in which case a BROWSE dialog will be presented where you select a file to browse. Or, it can be coded as -BROWSE filename, to start SPFLite with the specified filename opened for browsing.


To create a BROWSE icon, copy the normal icon and add -BROWSE as an operand, in the icon's Properties window. You can now  Drag-and-Drop files onto the icon to quickly Browse them.


-CLIP option


If  '-CLIP'  appears in the command line, SPFLite will operate in clipboard edit mode, which does the following:


    • The contents of the Windows clipboard are opened up into a Clipboard edit session when SPFLIte starts. This will directly edit the contents of the Windows clipboard, without any intermediate or temporary file involved.


    • When the primary Command END is entered, the current edit data is returned to the Windows clipboard. 


Clipboard mode is designed to provide a quick, convenient means for editing clipboard data with the SPFLite command set. From outside SPFLite, it works most effectively if a separate icon is created for SPFLite that has a command-line operand of -CLIP. To create a CLIP icon on the desktop, copy the normal icon and add -CLIP as an operand, in the icon's Properties window. You can now click on the icon to directly edit the clipboard contents.


If SPFLite is already running, you can use the CLIP primary command to open a new tab containing the current clipboard contents.


-DO macroname


If '-DO' appears as the command line, SPFLite will invoke the specified DO macro following all normal initialization functions.  The SPFLite session will be switched to the File Manager Tab so the DO macro must be crafted to operate in that environment.


-FILEOPEN option

 

The -FILEOPEN option specifies the name of an FileOpen file containing the names of files you wish to have opened immediately after startup. The format of this file is described in "FileOpen Startup Files" . If the filename is entered as a simple "*", it requests use of the standard _FILEOPEN.TXT file created by the INSTANCE command. If the filename is not a complete path, the SPFLite HomeFolder will be added.


-INSTANCE instance-name


This option allows you to run unique instances of SPFLite, each with its own customization options.  SPFLite will display the instance-name in the window title, replacing the normal SPFLite version number. Please read  Managing SPFLite Instances and Configuration for more details.


-KEYMAP option

 

The -KEYMAP option causes SPFLite to launch the KEYMAP dialog immediately after startup, and prior to beginning normal editing operations. You might wish to use the -KEYMAP option in case you had a serious KEYMAP configuration issue that was preventing you from operating SPFLite properly, such as the absence of a properly defined ENTER key. 


Because use of the -KEYMAP option is a type of "emergency startup" contingency, SPFLite will not have completely finished all of its initialization steps when you get the KEYMAP dialog. As a result, the dialog will be displayed with a default font rather than your customary editing font. After you finish, and then SPFLite begins normal operation, the customary editing font will appear when you issue a KEYMAP command again.


-NOLOOP option


If '-NOLOOP' appears as the command line, SPFLite will NOT activate it's normal loop detection logic. This detection logic is designed to monitor for SPFLite activities which are taking far longer than expected to complete. It provides a Pop-Up message which allows the user to cancel the session, or to allow execution to continue.


However some activities can be delayed by external factors (LAN network slowdowns etc.) and the Pop-Ups can become a nuisance since there is no real underlying problem which can be corrected. -NOLOOP simply requests SPFLite to forgo monitoring for such loop conditions.


-SCRSIZE option


If '-SCRSIZE' appears on the command line, SPFLite override the normal screen opening, which re-opens the screen at the same size and position as of the last termination.


'option' may be either:

FULL - will open the screen in full-screen mode.


hhXww - where hh is the screen height (in lines), 'X' is a constant, and ww is the screen width, in columns.   e.g.  -SCRSIZE 24X80 requests a 24 line screen, 80 columns wide.


-VIEW option


VIEW mode allows you to use SPFLite to view data files in read-only mode without risk of changing the data. This is particularly important if you normally open files with with the Profile set to AUTOSAVE ON, or if you have opened an important file and want to be sure it does not get modified. Unlike BROWSE, VIEW allows you to make changes to the file, they will simply not be saved. If you make changes to a Viewed file, the word View in the left-hand Status Bar box will be displayed as View to remind you.


In VIEW mode, the SAVE and REPLACE commands are disabled, as is the AUTOSAVE function of the END command. The CREATE command is allowed in VIEW, so you can create other files without changing the one you are browsing. You may also save the entire file you are browsing under a new name by using SAVEAS. (If you happen to use the SAVEALL command from any open file, it will only save files opened for edit, while files opened for browse are ignored.)


-VIEW  may be coded alone as an operand, in which case a VIEW dialog will be presented where you select a file to View. Or, it can be coded as -VIEW filename, to start SPFLite with the specified filename opened for viewing.


To create a VIEW icon, copy the normal icon and add -VIEW as an operand, in the icon's Properties window. You can now  Drag-and-Drop files onto the icon to quickly View them.

 

  

-WINE option


This option is no longer needed, SPFLite will automatically detect if it is running under WINE.


Example: The command line:


SPFLITE.EXE -I CUSTOM -B MyTestFile.txt


Requests SPFLite to start in Browse using the CUSTOM Instance for customization, and to Open MyTestFile.txt as the initial working file.

 

Specifying an Overriding Profile to use


When you specify a filename on the command-line to be opened (including the -BROWSE and -VIEW variations) it is possible to specify a different Profile name to be used to process the file. This is the same ability that is provided by the Primary EDIT, BROWSE and VIEW commands.


Simply provide the overriding Profile name, preceded by a . (period) on the command line following the filename. If the filename was enclosed in quotes, the Profile name follows this trailing quote, and is not itself quoted.


e.g.     SPFLite -B .NewProfile "My File To Browse.txt" 


The above shows a request to browse a file using the special profile called 'NewProfile'.


Specifying an Overriding Initial Macro to use


When you specify a filename on the command-line to be opened it is possible to specify an Initial macro to be performed as soon as the file is loaded.  If the file is using a Profile which itself contains an IMACRO request, the command line macro is used instead of the Profile IMACRO


Simply provide the macro name, preceded by a %. (percent sign) on the command line following the filename. If the filename was enclosed in quotes, the Macro name follows this trailing quote, and is not itself quoted.


e.g.     SPFLite -E %MyMacro "MyFile.txt" 


The above shows a request to Edit a file using the Initial Macro 'MyMacro'.


Specifying an Overriding XFORM macro to use


When you specify a filename on the command-line to be opened it is possible to specify an Initial XFORM macro to be used to perform the read and write functions for the file. If the file is using a Profile which itself contains an XFORM request, the command line macro is used instead of the Profile XMACRO


Simply provide the macro name, preceded by a /. (forward slash) on the command line following the filename. If the filename was enclosed in quotes, the Macro name follows this trailing quote, and is not itself quoted.


e.g.     SPFLite -E /MyXFormMacro "MyFile.txt" 


The above shows a request to Edit a file using the Initial Macro 'MyXFormMacro'.


Terminating SPFLite


When SPFLite is terminated, it will 'remember' the current screen position and size and will use these values the next time it is started. If SPFLite was Maximized at termination time, it will be restarted in Maximized mode.

 

As with startup, the other actions performed at termination are affected by your Option choices. There are two levels of termination, the first is the termination of a single file tab, the second is termination of all file tabs and SPFLite shutdown.


Terminating a Single File Tab


A single file tab is terminated with the END command. This can also be accomplished by right-clicking on the desired tab. When you use a right-click in this way, SPFLite treats it as identical to the END command, or to a key mapped to the END command. 


    • If the tab is in View mode, and the file has not been modified, it is simply closed. If you have modified the file during View, then the action depends on your choice for the Options -> General selection of Warn on modified View file   If you chose to be warned, then you will be given an option to return to View or just exit;  If you chose not to be warned, the file is closed without saving.


    • If the tab is in CLIP mode, the current text contents are returned to the Windows clipboard and the tab is closed.


    • If the tab is in EDIT mode, the contents will be either saved or not saved, based on the Profile AUTOSAVE option for the file's file type; and then the tab will be closed.


For all above cases, if there are still remaining active tabs, control will be passed to the adjacent tab. 


If there are no further active tabs, what happens next is based on whether you enabled "Close File Mgr with last tab" in the File Manager Options. If you enabled this, SPFLite will terminate. Otherwise, control is passed to File Manager. 


When the END command is issued in the File Manager, it does not 'close' it, but causes the file display to move up to the next higher directory level, or back from a File List display to a directory display. Repeated use of the END command will eventually leave the File Manager displaying the root directory of the selected drive, which for most users will be the C:\ directory, and at that point END will have no further effect.


Terminating All Tabs


If the Windows standard close button [X] in the title bar is clicked, or the EXIT command or the =X command is issued, all file tabs will be processed as if an END command had been entered and SPFLite itself will terminate. 


There are some differences between using the close button [X] to close SPFLite, and using END on each tab first.


Just so we're clear here, don't confuse "the [X] button" with the "=X command". The [X] button is a Windows icon that looks like an X on the right side of the Title Bar of the SPFLite window that you click on with the mouse, whereas the =X command is an SPFLite command that is identical to the EXIT command and is typed on the primary command line by you as the characters =X followed by the ENTER key.


When you use the close button [X], SPFLite first remembers all currently active files, so that when you restart SPFLite later, all these files will be reopened, and then all tabs, including File Manager, are closed. 


If you use END individually for every file, they are all now "closed" and so when you restart, there are no previously open sessions to be resumed, and so none of them will be automatically reopened. 


The EXIT command can also take an optional NOREOPEN operand. If NOREOPEN is specified, SPFLite will not save the list of currently open Edit tabs for use at the next normal SPFLite start. This means the next SPFLite startup will begin in the File Manager tab, with no other tabs being automatically loaded. 


Whether SPFLite re-opens files at start-up is controlled by a preferences selection on the Options -> General screen. The NOREOPEN option will cause the list of currently-open files to be discarded, even if the Re-open checkbox is enabled. (The files themselves are not discarded - only the list that refers to them is discarded.)


When your options are set to re-open the previous set of files at startup, these files will only be opened by the first instance of SPFLite that starts. If your settings allow multiple instances of SPFLite, then 2nd and subsequent instances will not attempt to re-open the set of files again.


Note re: XFORM sessions


When SPFLite saves the list of files to be re-opened at the next startup, it will never include the files from any tabs loaded via XFORM support.  XFORM support is unique and should only be invoked manually, to protect the integrity of the files.  More details on XFORM support can be found in "Working with XFORM".

Created with the Personal Edition of HelpNDoc: Revolutionize Your Documentation Output with HelpNDoc's Stunning User Interface