Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SCCText on an entire project?
Message
 
To
19/04/2011 23:55:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01507870
Message ID:
01507894
Views:
161
>How can I easily run SCCText (or SCCTextX) on each SCX and VCX in my project?
>
>I'm not looking for some super duper total Source Control trick... I just want the ascii output that SCCText creates, dumped right into the folder where each SCX and VCX in the project lives.
>
>(To share exactly what happens next.. I'm pushing the contents of the directory up to a Mercurial repository space up in the cloud. And I want a text version of each file to go up with each push.)
LOCAL loProject, ;
      loEx AS Exception, ;
      loFile, ;
      lcSCCText
      
lcSCCText = HOME(0) + "SCCText.PRG"

IF !FILE(lcSCCText)
   MESSAGEBOX("Unable to file " + HOME(0) + "SCCText.PRG", 16, "Error")
ENDIF

TRY
   loProject = _vfp.ActiveProject 
CATCH TO loEx
   
ENDTRY

IF TYPE("loEx") = "O"
   MESSAGEBOX("There are no active projects", 64, "Error")
   RETURN
ENDIF

FOR EACH loFile IN loProject.Files
    ? "Generating: " + loFile.Name 
    IF INLIST(loFile.Type, "V", "K", "R") 	&& VCX/SCX/FRX
       DO (lcSCCText) WITH loFile.Name
    ENDIF
ENDFOR
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform