INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Utility Program

Collection of PRGs - all code in one window by ramani
Posted: 28 Dec 02 (Edited 28 Dec 02)

*********************************************************
** Author : Ramani (Subramanian.G)
**          FoxAcc Software / Winners Software
**          ramani_g@yahoo.com
** Type   : Freeware with reservation to Copyrights
** Warranty : Nothing implied or explicit
** Last modified : 27 December, 2002
*********************************************************
* This will consolidate all Prgs included in open project
*   and open up editor window.
*   Save to your convenience with a suitable file name.
*********************************************************
** PROCEDURE gscode3
** How to Run..
** 1. Save the following code as gsCode3.PRG
** 2. Open the project
** 3. From command window type DO gsCode3
*********************************************************

** Programe gsCode3

#DEFINE CRLF chr(13)+chr(10)

LOCAL cPrgFile,cText,cOutPut,cTitle,Date_time,cLine,nFiles

** Collect files from project
nFiles = application.ActiveProject.Files.Count
cOutPut = SYS(3)+".txt"

cLine = REPLICATE("*",70)+CRLF

cTitle = "** Documentation of the PRGS in Project: " + ;
           application.ActiveProject.Name+CRLF
date_time = "** Date/Time: "+ TTOC(DATETIME())+CRLF

*Write the headers with formTitle+date+time
STRTOFILE("",cOutput,.F.) && Wipe existing file
STRTOFILE(cTitle,cOutPut,.T.)
STRTOFILE(date_time,cOutPut,.T.)
STRTOFILE(cLine,cOutPut,.T.)
STRTOFILE(CRLF+CRLF+CRLF,cOutPut,.T.)
**

FOR i =  1 TO nFiles
   cPrgFile = application.ActiveProject.Files(i).NAME
   IF UPPER(JUSTEXT(cPrgFile)) = "PRG"
      ** Now we can actually start
      cText=FILETOSTR(cPrgFile)
      ** Create a sub-title for the form
      cTitle = "** PRG: " +cPrgFile+CRLF
      STRTOFILE(cTitle,cOutPut,.T.)
      STRTOFILE(cLine,cOutPut,.T.)
      STRTOFILE(cText,cOutPut,.T.)
      STRTOFILE(cLine,cOutPut,.T.)
      STRTOFILE("** End of PRG.: "+cPrgFile+CRLF, ;
                cOutPut,.T.)
      STRTOFILE(cLine+cline+cline+cline+cline,cOutPut,.T.)
      STRTOFILE(CRLF+CRLF+CRLF,cOutPut,.T.)
   ENDIF
ENDFOR
MODIFY FILE (cOutPut)
STRTOFILE("",cOutput,.F.) && Wipe file created
RETURN

*********************************************************
* EOF:
*********************************************************
Evaluate this to make others know how useful is this

Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close