home *** CD-ROM | disk | FTP | other *** search
- /* This macro inserts the name of the current file, with */
- /* path information in the current line at the cursor */
- 'EXTRACT CURSORPOS'
- 'EXTRACT NAME'
- 'EXTRACT CONTENT'
- namenum = length(name) /* determine length of filename & path */
- beginning=cursorpos-1
- start = substr(content,1,beginning) /* determine text prior to cursor if any */
- lastpart = length(start)+1
- ending = substr(content, lastpart) /* determine text after cursor if any */
- 'SET CONTENT' start||name||ending /* reset the line with the filename & path */
- newposition=lastpart+namenum
- 'SET CURSORPOS' newposition /* move cursor following filename */
-