JavaScript Editor js editor     Web development 

Main Page

Opens an editing window so you can modify or create a text file.

   [RANGE nStartCharacter, nEndCharacter] [[WINDOW WindowName1]
   [IN [WINDOW] WindowName2 | IN SCREEN]] [AS nCodePage] [SAME] [SAVE]



Specifies the file name for the text file. If you don't specify an extension for a new text file, Visual FoxPro automatically assigns a .txt extension. MODIFY FILE supports a file skeleton that can contain the asterisk (*) and question mark (?) wildcards. An editing window is opened for each text file whose name matches the file skeleton. If you omit the file name, an editing window opens for a file initially named FILE1. When you close the editing window, you can save the file with a different name.

Displays the Open dialog box, from which you can choose a text file.

Specifies that the text file can't be changed, but can be viewed and copied to the Clipboard.

Removes the Format menu title from the Visual FoxPro system menu bar, preventing changes to font, font size, line spacing, and indentation.

Continues program execution after the editing window is opened. The program doesn't wait for the editing window to be closed, but continues execution on the program line immediately following the line that contains MODIFY FILE NOWAIT. If you omit NOWAIT when MODIFY FILE is issued in a program, the editing window is opened and program execution pauses until the editing window is closed. NOWAIT is effective only from within a program. It has no effect on MODIFY FILE when issued from the Command window. An implicit NOWAIT occurs if you open more than one editing window with a single MODIFY FILE command. For example:
В Copy Code
RANGE nStartCharacter, nEndCharacter

Specifies a range of characters selected when you open an editing window. Characters are selected starting at the position specified with nStartCharacter up to (but not including) the character position of nEndCharacter. If nStartCharacter is equal to nEndCharacter, no characters are selected, and the cursor is placed at the position specified with nStartCharacter.
WINDOW WindowName1

Specifies a window whose characteristics the editing window takes on. For example, if the window is created with the FLOAT option of DEFINE WINDOW, the editing window can be moved. The window need not be active or visible, but it must be defined.
IN [WINDOW] WindowName2

Specifies a parent window in which the editing window is opened. The editing window doesn't assume the characteristics of the parent window and cannot be moved outside the parent window. If the parent window is moved, the editing window moves with it. The parent window must first be defined with DEFINE WINDOW, and must be visible in order to access the editing window.

Explicitly opens the editing window in the main Visual FoxPro window, after it has been placed in a parent window. An editing window is placed in a parent window by including the IN WINDOW clause.
AS nCodePage

Automatically converts accented characters in a text file created on another Visual FoxPro platform. The numeric expression nCodePage specifies the code page of the Visual FoxPro platform on which the text file was created. The file is saved in this code page unless you choose Save As from the File menu to save the file in a different code page.

Prevents the editing window from coming forward as the active window. If the editing window is hidden, it is displayed but doesn't become the active window.

Leaves the editing window open after another window is activated. If you omit SAVE, the editing window is closed when another window is activated. Including SAVE has no effect when issued from the Command window.


When modifications are made to a text file, the updated file is written to disk. In Visual FoxPro, a backup file with a .bak extension is created if you select the Make Backup Copy check box on the Edit Properties dialog box, which appears when you choose Properties from the Edit menu. In previous versions of FoxPro, a backup file with a .bak extension is created if you select the Backup check box in the Preferences dialog box, which appears when you choose Preferences from the Edit menu.

The Visual FoxPro editor is used unless you specify an external editor with TEDIT in your configuration file.

See Also

JavaScript Editor js editor     Web development