*-- Sample code with the information for directly calling Beatify.app Local cinputfile, coptions, coutputfile, obopt cinputfile = 'testbeautyfy.prg' *-- Beautify options object obopt = CreateObject('beautyfyopt') obopt.keywordcap = 1 obopt.identspace = 2 *-- Get the string of options coptions = obopt.GetOptionsStr() *-- Call beautify.app coutputfile = Beautify(cinputfile, coptions) *-- View the result of beautify (temporary file) Modify command (coutputfile) Return *-- Define the options required by beautify.app Define Class BeautyfyOpt As Custom *-- 1-Upper case, 2-Lowercase, 3-Match first, 4-Nochange symbolscap = 3 *-- 1-Uppercase, 2-Lower case, 3-Mixed Case, 4-No change keywordcap = 3 identspace = 4 *-- 1-tabs, 2-space, 3-nochange typeofident = 2 identcomments = .f. identcontinuation = .t. extraidentproc = .f. extraidentdocase = .f. Function GetOptionsStr Local cstropt cstropt = Replicate(chr(0), 36) cstropt = stuff(cstropt, 1, 1, chr(this.symbolscap)) cstropt = stuff(cstropt, 5, 1, chr(this.keywordcap)) cstropt = stuff(cstropt, 9, 1, chr(this.identspace)) cstropt = stuff(cstropt, 13, 1, chr(this.typeofident)) cstropt = stuff(cstropt, 21, 1, chr(iif(this.identcomments,1,0))) cstropt = stuff(cstropt, 25, 1, chr(iif(this.identcontinuation,1,0))) cstropt = stuff(cstropt, 29, 1, chr(iif(this.extraidentproc,1,0))) cstropt = stuff(cstropt, 33, 1, chr(iif(this.extraidentdocase,1,0))) Return cstropt EndFunc EndDefine