Peter,
I dont see what the use is to convert a scx file to a .txt file, but if you realy want, the most easiest way is to do, since scxtoprg does not give in all case a workable .scx: open your formin the vfp menu: -> file -> save as class -> give name and give a classname plus location -> Save. Close the form. Again in VFP menu now -> Class browser -> 2nd button (Open) -> select the class which you just constructed -> click on the class name you just constructed ->4th button (View class code) You will see a .prg file "Viewclasscode.prg" Save this .prg file and you are done. This script will always produce the form.
You do know you can run one and the same form n- times with folllowing command? do form myForm where you have to replace myForm with your form's name, you donot even need to add .scx
Regards, Koen
Op do 30 mei 2019 om 15:36 schreef Peter Cushing < pcushing@whisperingsmith.com>:
Hi Wes,
I generate my forms to a .txt version that I can use to diff what has changed. It also does classes to a .txt file. The program checks the date/time of the .scx file and the .txt file (if it exists) and if the text file is older or does not exist it will generate one use using scctextx.prg which I think I got from the internet. You could easily change it to output a .prg in the call to scctextx.
Anyway here is my genform.prg:
- go through forms folder and check each form to see if the form
- date is later than the .txt file of the form or if the .txt file
- has not been generated yet.
LOCAL tModified,lOlder LOCAL nTextfile PRIVATE cHome LOCAL ARRAY aForms[1],aTxtFile[1] CLEAR SET TALK off cHome = "c:\ws\forms" DO processit WITH 'scx',"K"
- then classes
cHome = "c:\ws\classes" DO processit WITH 'vcx',"V"
RETURN
FUNCTION processit PARAMETERS cExt,cLetter LOCAL nForms,i,cForm ? 'Processing: ' + cHome + ' for: ' + cExt
- first get a list of forms to process
nforms = ADIR(aForms,cHome + '*.'+cExt,'')
FOR i = 1 TO nForms cForm = JUSTSTEM(aForms[i,1])
- now find out if no file or text file older
tModified = CTOT(DTOC(aForms[i,3]) + ' ' + aForms[i,4]) lOlder = .t. IF FILE(cHome + cForm + '.txt') nTextfile = ADIR(aTxtFile,cHome + cForm + '.txt','') IF nTextfile > 0 IF tModified < CTOT(DTOC(aTxtFile[1,3]) + ' ' + aTxtFile[1,4]) lOlder = .f. ENDIF ENDIF ENDIF IF lOlder ? 'Generating text file for ' + cForm DO (HOME() + 'scctextx') WITH cHome + cForm + "."+cExt,cLetter,cHome + cForm + ".txt",.t. ENDIF NEXT CLOSE TABLES ALL RETURN
Peter Cushing IT Department WHISPERING SMITH
On 22/05/2019 18:35, wes.wilson@yahoo.com wrote:
Is there a way to convert a group of SCXs into PRGs in batch mode? I
need to do 400 of them.
Google did not help. Thanks,Wes Wes Wilson, President ERW Custom Programming, Inc. Crescent Lake Plaza 5459 Elizabeth Lake Rd. Waterford, MI 48327 (248) 683-4182 LinkedIn Profile
"Companies pay too much attention to the cost of doing something. They should worry more about the cost of not doing it" Philip Kotler www.erw.com wes@erw.com
On Wednesday, May 22, 2019, 1:50:23 AM EDT, <profox-request@leafe.com> wrote:
Send ProFox mailing list submissions to profox@leafe.com
To subscribe or unsubscribe via the World Wide Web, visit http://mail.leafe.com/mailman/listinfo/profox or, via email, send a message with subject or body 'help' to profox-request@leafe.com
You can reach the person managing the list at profox-owner@leafe.com
When replying, please edit your Subject line so it is more specific than "Re: Contents of ProFox digest..." Today's Topics:
- Re: [NF] Cursing Microsoft for dialog boxes that will not expand in any direction in Word 2016 (MB Software Solutions, LLC)
- Re: [NF] Cursing Microsoft for dialog boxes that will not expand in any direction in Word 2016 (Kurt @ Gmail)
- Re: ? Cross tabulation (Ted Roche)
- Re: ? Cross tabulation (Ted Roche)
- Re: [NF] Cursing Microsoft for dialog boxes that will not expand in any direction in Word 2016 (Eric Selje)
- Re: [NF] Cursing Microsoft for dialog boxes that will not expand in any direction in Word 2016 (MB Software Solutions, LLC)
- Re: ? Cross tabulation (MB Software Solutions, LLC)
- Re: Filtering Oddity (Gene Wirchenko)
- Re: Filtering Oddity (Gene Wirchenko)
- Re: Filtering Oddity (Gene Wirchenko)
- Re: [NF] Cursing Microsoft for dialog boxes that will not expand in any direction in Word 2016 (Gene Wirchenko)
- Re: Filtering Oddity (AndyHC)
- Re: [NF] Cursing Microsoft for dialog boxes that will not expand in any direction in Word 2016 (Kurt @ Gmail)
Ouch...that gives me a headache just trying to decipher that!
On 5/21/2019 4:36 AM, Johan Nel wrote:
And straight from the .NET runtime, the culprit is.... drum rolling...... BestFitMapping = false :-)
[DllImport("user32.dll", BestFitMapping = false, CharSet = CharSet.Auto, SetLastError = true)] [SuppressUnmanagedCodeSecurity] [SecurityCritical] public static extern int MessageBox(HandleRef hWnd, string text, string caption, int type);
On 2019/05/20 23:52, MB Software Solutions, LLC wrote:
GRRRRRR!!!!! I've got a colossal cleanup to do with bookmark references and this freaking window refuses to enlarge in any direction: https://www.screencast.com/t/PTDtv8bVI
C'MON, M$!!! NOT TODAY!!!!!
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[excessive quoting removed by server]