----------------------------------------------------------------------
--- Knud van Eeden --- 06 December 2009 - 04:25 am -------------------

Computer: Editor: Text: TSE: Zip: File: All: Operation: Compare: Difference: How to view all in a report all differences between corresponding filenames in 2 given zip files?

===

 1. Two temporary directories are first removed if existing, then created

 2. The given 2 zip files are unzipped in this 2 temporary directories

 3. TSE recursively gets all files in directory1 and its subdirectories

 4. TSE extracts each found filename, and searches recursively for all same filenames in directory2 and its subdirectories and puts it in a list

 5. Then this file from directory1 is compared for differences with all found filenames in that list
    (using one or more difference programs)

 6. This is repeated for all the files in directory1

===

Steps: Overview:

 1. -Currently you will have to change the source code, because I am
     using 4NT aliases, and installed search programs. But the
     blueprint is present.

     So it will currently *not* run out of the box, it will have to be
     changed by you and recompiled.

 2. -Optionally install (otherwise use your own installed search routines)

      -BeyondCompare Pro

      -Cygwin diff.exe

      -KDiff3

      -Microsoft fc.exe

      -Total Commander

      -WinDiff

      -WinMerge

      -XML Lint

      Further

      -JPSoft 4nt

      -PKWare pkzipc.exe

 3. -If you are using BeyondCompare, optionally use this script to generate the HTML report
     (and save it e.g. as c:\temp\myscript.txt)

--- cut here: begin --------------------------------------------------
file-report layout:side-by-side & options:ignore-unimportant,display-context & output-to:%3 output-options:html-color %1 %2
--- cut here: end ---------------------------------------------------- 4. -E.g. create the following program: --- cut here: begin --------------------------------------------------
// filenamemacro=compfird.s
--- cut here: end ---------------------------------------------------- --- cut here: begin --------------------------------------------------
// PROC PROCFileCompareFileZip1ToZip2DirectoryAllReportDifference( STRING fileNameZip1S, STRING fileNameZip2S, STRING directory1S, STRING directory2S, STRING scriptFileNameS, STRING reportFileNameS )
--- cut here: end ---------------------------------------------------- --- cut here: begin --------------------------------------------------
FORWARD INTEGER PROC FNBufferGetBufferIdFileCurrentI() FORWARD INTEGER PROC FNBufferGetBufferIdGivenBufferNameI( STRING s1 ) FORWARD INTEGER PROC FNErrorCheckEscapeB( STRING s1 ) FORWARD INTEGER PROC FNErrorCheckSB( STRING s1 ) FORWARD INTEGER PROC FNFileCheckDirectoryExistSimpleB( STRING s1 ) FORWARD INTEGER PROC FNFileCheckEditCentralMessageB( STRING s1, INTEGER i1 ) FORWARD INTEGER PROC FNFileCheckEditMessageB( STRING s1 ) FORWARD INTEGER PROC FNFileCheckGotoEndB() FORWARD INTEGER PROC FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( STRING s1, INTEGER i1 ) FORWARD INTEGER PROC FNFileCreateDirectoryNestB( STRING s1 ) FORWARD INTEGER PROC FNHistoryCheckAskCentralB( STRING s1, VAR STRING s2, INTEGER i1 ) FORWARD INTEGER PROC FNKeyCheckPressEscapeB( STRING s1 ) FORWARD INTEGER PROC FNLineCheckGotoBeginB() FORWARD INTEGER PROC FNLineCheckInsertAfterLineGotoBeginTextInsertB( STRING s1 ) FORWARD INTEGER PROC FNMacroCheckExecB( STRING s1 ) FORWARD INTEGER PROC FNMacroCheckLoadB( STRING s1 ) FORWARD INTEGER PROC FNMacroCheckPurgeB( STRING s1 ) FORWARD INTEGER PROC FNMathCheckGetLogicFalseB() FORWARD INTEGER PROC FNMathCheckGetLogicTrueB() FORWARD INTEGER PROC FNMathCheckInitializeNewBooleanFalseB() FORWARD INTEGER PROC FNMathCheckLogicNotB( INTEGER i1 ) FORWARD INTEGER PROC FNMathCheckLogicOrB( INTEGER i1, INTEGER i2 ) FORWARD INTEGER PROC FNMathGetProgramLineNumberAbsoluteCurrentI() FORWARD INTEGER PROC FNStringCheckEmptyB( STRING s1 ) FORWARD INTEGER PROC FNStringCheckEmptyNotB( STRING s1 ) FORWARD INTEGER PROC FNStringCheckEnvironmentFoundNotB( STRING s1 ) FORWARD INTEGER PROC FNStringCheckEqualB( STRING s1, STRING s2 ) FORWARD INTEGER PROC FNStringCheckEqualCharacterLastNB( STRING s1, STRING s2 ) FORWARD INTEGER PROC FNStringCheckEqualErrorOrEmptyB( STRING s1 ) FORWARD INTEGER PROC FNStringGetLengthI( STRING s1 ) FORWARD INTEGER PROC FNTextCheckInsertB( STRING s1 ) FORWARD INTEGER PROC FNTextCheckInsertCentralB( STRING s1, INTEGER i1 ) FORWARD PROC Main() FORWARD PROC PROCError( STRING s1 ) FORWARD PROC PROCErrorFileNotFound( STRING s1 ) FORWARD PROC PROCFileCompareAllDirectoryReportDifference( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) FORWARD PROC PROCFileCompareAllDirectoryReport_DifferenceSub( STRING s1, STRING s2, STRING s3, STRING s4, INTEGER i1, INTEGER i2, STRING s5 ) FORWARD PROC PROCFileCompareCygwinDiff( STRING s1, STRING s2 ) FORWARD PROC PROCFileCompareFileZip1ToZip2DirectoryAllReportDifference( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5, STRING s6, STRING s7 ) FORWARD PROC PROCFileCompareGnuDiff( STRING s1, STRING s2 ) FORWARD PROC PROCFileCompareMicrosoftFc( STRING s1, STRING s2 ) FORWARD PROC PROCFileCompareXmlDiff( STRING s1, STRING s2 ) FORWARD PROC PROCFileCreateDirectoryNest( STRING s1 ) FORWARD PROC PROCFileGetUnzipToDirectory( STRING s1, STRING s2 ) FORWARD PROC PROCFileGotoEnd() FORWARD PROC PROCFileInsertEndPrepare() FORWARD PROC PROCFileInsertTextEnd( STRING s1, STRING s2, INTEGER i1 ) FORWARD PROC PROCFileRun4NtAliasCommandListUser( STRING s1 ) FORWARD PROC PROCFileSearchAllDirectoryWalkTheTree( STRING s1, STRING s2 ) FORWARD PROC PROCFileSearchAllDirectoryWalkTheTreeSub( STRING s1, STRING s2, INTEGER i1 ) FORWARD PROC PROCLineInsertAfter() FORWARD PROC PROCLineInsertAfterLineGotoBeginTextInsert( STRING s1 ) FORWARD PROC PROCMacroExec( STRING s1 ) FORWARD PROC PROCMacroPurge( STRING s1 ) FORWARD PROC PROCMacroRunCaptureTse( STRING s1 ) FORWARD PROC PROCMacroRunCaptureTseCons3( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCMacroRunPurge( STRING s1 ) FORWARD PROC PROCMacroRunPurgeParameter( STRING s1, STRING s2 ) FORWARD PROC PROCMessage( STRING s1 ) FORWARD PROC PROCMessageCons3( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunBeyondcompareParameter( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) FORWARD PROC PROCProgramRunCompareKdiff3Alias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunCompareTotalcommanderAlias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunCompareWindiffAlias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunCompareWinmergeAlias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunFileCompareCsdiffAlias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunFileCompareExamdiffAlias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunFileComparePerforceP4merge( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunFileCompare_BeyondcompareAlias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunFileRemoveDirectoryDeltreeAlias( STRING s1 ) FORWARD PROC PROCProgramRunFileZipToDirectoryUnzipPkzipcAlias( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCProgramRunInternetBrowserAlias( STRING s1 ) FORWARD PROC PROCTextGotoLineBegin() FORWARD PROC PROCTextInsert( STRING s1 ) FORWARD PROC PROCTextRemovePositionStackPop() FORWARD PROC PROCTextSavePositionStackPush() FORWARD PROC PROCWarn( STRING s1 ) FORWARD PROC PROCWarnCons3( STRING s1, STRING s2, STRING s3 ) FORWARD PROC PROCWarnCons4( STRING s1, STRING s2, STRING s3, STRING s4 ) FORWARD PROC PROCWarnCons5( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) FORWARD STRING PROC FNStringGetAlias4NtDefaultS( STRING s1 ) FORWARD STRING PROC FNStringGetAlias4NtS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetAsciiToCharacterS( INTEGER i1 ) FORWARD STRING PROC FNStringGetCarS( STRING s1 ) FORWARD STRING PROC FNStringGetCharacterEndBackSlashNotEqualInsertEndS( STRING s1 ) FORWARD STRING PROC FNStringGetCharacterInsertEndIfEqualNotS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetCharacterSymbolCentralS( INTEGER i1 ) FORWARD STRING PROC FNStringGetCharacterSymbolSlashBackwardS() FORWARD STRING PROC FNStringGetCharacterSymbolSpaceS() FORWARD STRING PROC FNStringGetConcatS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetConcatSeparatorS( STRING s1, STRING s2, STRING s3 ) FORWARD STRING PROC FNStringGetConcatTailS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetCons3S( STRING s1, STRING s2, STRING s3 ) FORWARD STRING PROC FNStringGetCons4S( STRING s1, STRING s2, STRING s3, STRING s4 ) FORWARD STRING PROC FNStringGetCons5S( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) FORWARD STRING PROC FNStringGetConsS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetEmptyS() FORWARD STRING PROC FNStringGetEnvironmentS( STRING s1 ) FORWARD STRING PROC FNStringGetErrorS() FORWARD STRING PROC FNStringGetEscapeS() FORWARD STRING PROC FNStringGetFileGetFilenamePathDefaultS( STRING s1 ) FORWARD STRING PROC FNStringGetFileIniDefaultS( STRING s1 ) FORWARD STRING PROC FNStringGetFilenameAliasBeyondcompareExecutableS() FORWARD STRING PROC FNStringGetFilenameCurrentS() FORWARD STRING PROC FNStringGetFilenameCygwinDiffS() FORWARD STRING PROC FNStringGetFilenameEndBackSlashNotEqualInsertEndS( STRING s1 ) FORWARD STRING PROC FNStringGetFilenameGetGlobalAliasS() FORWARD STRING PROC FNStringGetFilenameGlobalErrorS() FORWARD STRING PROC FNStringGetFilenameIniDefaultS() FORWARD STRING PROC FNStringGetGlobalS( STRING s1 ) FORWARD STRING PROC FNStringGetHistoryInputS( STRING s1, STRING s2, INTEGER i1 ) FORWARD STRING PROC FNStringGetInitializationGlobalS( STRING s1, STRING s2, STRING s3 ) FORWARD STRING PROC FNStringGetInitializeNewStringS() FORWARD STRING PROC FNStringGetInputFilenameCentralS( STRING s1, STRING s2, INTEGER i1, INTEGER i2 ) FORWARD STRING PROC FNStringGetInputFilenameS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetInputS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetLineNumberCurrentS() FORWARD STRING PROC FNStringGetMachineNameS() FORWARD STRING PROC FNStringGetMathIntegerToStringS( INTEGER i1 ) FORWARD STRING PROC FNStringGetMidStringS( STRING s1, INTEGER i1, INTEGER i2 ) FORWARD STRING PROC FNStringGetPathFileAlias4Dos4NtFilenameS() FORWARD STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashNotS() FORWARD STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashS() FORWARD STRING PROC FNStringGetPortS() FORWARD STRING PROC FNStringGetProgram4ntFilenameS() FORWARD STRING PROC FNStringGetRightStringLengthEqualS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetRightStringS( STRING s1, INTEGER i1 ) FORWARD STRING PROC FNStringGetSearchHistoryFindInputS( STRING s1, STRING s2 ) FORWARD STRING PROC FNStringGetSectionSeparatorS() FORWARD STRING PROC FNStringGetShortFilenameS( STRING s1 ) FORWARD STRING PROC FNStringGetUserNameFirstS() FORWARD STRING PROC FNStringGetUserNameLastS() FORWARD STRING PROC FNStringGet_FilenameIniDefaultS() // --- MAIN --- // // used for Cygwin diff.exe. Can be removed if you do not use Cygwin diff.exe DLL "<kernel32.dll>" INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" END // PROC Main() // STRING s1[255] = FNStringGetInitializeNewStringS() STRING s2[255] = FNStringGetInitializeNewStringS() STRING s3[255] = FNStringGetInitializeNewStringS() STRING s4[255] = FNStringGetInitializeNewStringS() STRING s5[255] = FNStringGetInitializeNewStringS() STRING s6[255] = FNStringGetInitializeNewStringS() STRING s7[255] = "65|712|713|801|821" s7 = FNStringGetInputS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: webMethods version = ", s7 ) IF FNKeyCheckPressEscapeB( s7 ) RETURN() ENDIF s1 = FNStringGetInputFilenameS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip1S = ", Format( "g:\utils\diagnosticKNUDDEFAULT", s7, "_data.zip" ) ) IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // s2 = FNStringGetInputS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip2S = ", "c:\temp\ddd2.zip" ) // s2 = FNStringGetInputS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip2S = ", "c:\temp\ddd2.zip" ) s2 = FNStringGetInputFilenameS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip2S = ", "g:\utils\diagnostic_data2.zip" ) IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF s3 = FNStringGetInputS( "file: compare: directory: difference: directory1S = ", "c:\temp\ddd1" ) IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF s4 = FNStringGetInputS( "file: compare: directory: difference: directory2S = ", "c:\temp\ddd2" ) IF FNKeyCheckPressEscapeB( s4 ) RETURN() ENDIF s5 = FNStringGetInputS( "file: compare: directory: difference: scriptFilenameS = ", "g:\utils\myscript.txt" ) // script used by BeyondCompare IF FNKeyCheckPressEscapeB( s5 ) RETURN() ENDIF s6 = FNStringGetInputS( "file: compare: directory: difference: reportFilenameS = ", "c:\temp\report.htm" ) // report created by BeyondCompare IF FNKeyCheckPressEscapeB( s6 ) RETURN() ENDIF // PROCFileCompareFileZip1ToZip2DirectoryAllReportDifference( s1, s2, s3, s4, s5, s6, "all" ) PROCFileCompareFileZip1ToZip2DirectoryAllReportDifference( s1, s2, s3, s4, s5, s6, "" ) END <F12> Main() // --- LIBRARY --- // // library: string: initialize [kn, ri, mo, 09-07-2001 12:00:07] STRING PROC FNStringGetInitializeNewStringS() RETURN( FNStringGetEmptyS() ) END // library: string: get: input <description>input a string</description> <version>1.0.0.0.1</version> (filenamemacro=getstgiq.s) [kn, ni, mo, 03-08-1998 13:04:18] STRING PROC FNStringGetInputS( STRING askS, STRING answerDefaultS ) // e.g. PROC Main() // e.g. Message( FNStringGetConcat3S( "'", FNStringGetInputS( "Choose option (Y/n)", "Y" ), "'" ) ) // gives e.g. "Y" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetSearchHistoryFindInputS( askS, answerDefaultS ) ) // END // library: key: check: press: escape <description>input: escape: test if escape was pressed</description> <version>1.0.0.0.2</version> (filenamemacro=checkepe.s) [kn, ni, we, 05-08-1998 20:29:00] INTEGER PROC FNKeyCheckPressEscapeB( STRING s ) // version with testing local variable // e.g. PROC Main() // e.g. Message( FNKeyCheckPressEscapeB( "" ) ) // version with testing local variable ) // gives e.g. FALSE // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringCheckEqualB( s, FNStringGetEscapeS() ) ) // END // library: input: input a filename <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstifi.s) [kn, zoe, mo, 13-11-2000 18:00:11] STRING PROC FNStringGetInputFilenameS( STRING askS, STRING defaultS ) // e.g. PROC Main() // e.g. Message( FNStringGetInputFilenameS( "input a file", "c:\temp\ddd.txt" ) ) // gives e.g. "c:\temp\ddd.txt" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetInputFilenameCentralS( askS, defaultS, _DEFAULT_, _EDIT_HISTORY_ ) ) // END // library: file: compare: file: zip1: to: zip2: directory: all: report: difference <description></description> <version control></version control> <version>1.0.0.0.25</version> (filenamemacro=compfird.s) [kn, ri, su, 06-12-2009 03:42:31] PROC PROCFileCompareFileZip1ToZip2DirectoryAllReportDifference( STRING fileNameZip1S, STRING fileNameZip2S, STRING directory1S, STRING directory2S, STRING scriptFileNameS, STRING reportFileNameS, STRING caseS ) // e.g. // used for Cygwin diff.exe. Can be removed if you do not use Cygwin diff.exe // e.g. DLL "<kernel32.dll>" // e.g. INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" // e.g. END // e.g. // // e.g. PROC Main() // e.g. // // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. STRING s4[255] = FNStringGetInitializeNewStringS() // e.g. STRING s5[255] = FNStringGetInitializeNewStringS() // e.g. STRING s6[255] = FNStringGetInitializeNewStringS() // e.g. STRING s7[255] = "65|712|713|801|821" // e.g. s7 = FNStringGetInputS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: webMethods version = ", s7 ) // e.g. IF FNKeyCheckPressEscapeB( s7 ) RETURN() ENDIF // e.g. s1 = FNStringGetInputFilenameS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip1S = ", Format( "g:\utils\diagnosticKNUDDEFAULT", s7, "_data.zip" ) ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. // s2 = FNStringGetInputS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip2S = ", "c:\temp\ddd2.zip" ) // e.g. // s2 = FNStringGetInputS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip2S = ", "c:\temp\ddd2.zip" ) // e.g. s2 = FNStringGetInputFilenameS( "file: compare: file: zip1: to: zip2: directory: all: report: difference: fileNameZip2S = ", "g:\utils\diagnostic_data2.zip" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "file: compare: directory: difference: directory1S = ", "c:\temp\ddd1" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. s4 = FNStringGetInputS( "file: compare: directory: difference: directory2S = ", "c:\temp\ddd2" ) // e.g. IF FNKeyCheckPressEscapeB( s4 ) RETURN() ENDIF // e.g. s5 = FNStringGetInputS( "file: compare: directory: difference: scriptFilenameS = ", "g:\utils\myscript.txt" ) // script used by BeyondCompare // e.g. IF FNKeyCheckPressEscapeB( s5 ) RETURN() ENDIF // e.g. s6 = FNStringGetInputS( "file: compare: directory: difference: reportFilenameS = ", "c:\temp\report.htm" ) // report created by BeyondCompare // e.g. IF FNKeyCheckPressEscapeB( s6 ) RETURN() ENDIF // e.g. // PROCFileCompareFileZip1ToZip2DirectoryAllReportDifference( s1, s2, s3, s4, s5, s6, "all" ) // e.g. PROCFileCompareFileZip1ToZip2DirectoryAllReportDifference( s1, s2, s3, s4, s5, s6, "" ) // e.g. END // e.g. // e.g. <F12> Main() // PROCFileGetUnzipToDirectory( fileNameZip1S, directory1S ) // PROCFileGetUnzipToDirectory( fileNameZip2S, directory2S ) // PROCFileCompareAllDirectoryReportDifference( directory1S, directory2S, scriptFileNameS, reportFileNameS, caseS ) // END // library: string: get: empty (return an empty string) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgem.s) [kn, ri, sa, 20-05-2000 20:11:03] STRING PROC FNStringGetEmptyS() // e.g. PROC Main() // e.g. Message( FNStringGetEmptyS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( "" ) END // library: string: get: search: history: find: input <description>input a string: history: find</description> <version>1.0.0.0.2</version> (filenamemacro=getstfir.s) [kn, ri, sa, 25-08-2001 21:00:25] STRING PROC FNStringGetSearchHistoryFindInputS( STRING askS, STRING answerDefaultS ) // e.g. PROC Main() // e.g. Message( FNStringGetSearchHistoryFindInputS( "Please input something", "test" ) ) // gives e.g. "test" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetHistoryInputS( askS, answerDefaultS, _FIND_HISTORY_ ) ) // END // library: string: equal: are two given strings equal? (stored in 'checstcf.s') [kn, zoe, we, 04-10-2000 18:23:27] INTEGER PROC FNStringCheckEqualB( STRING s1, STRING s2 ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: check: equal: first string = ", "a" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "string: check: equal: second string = ", "a" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNStringCheckEqualB( s1, s2 ) ) // gives e.g. TRUE when string1 is equal to string2 // e.g. END // e.g. // e.g. <F12> Main() // // // <F12> PROCMessage( FNStringCheckEqualB( "knud", "knud" ) ) // gives TRUE // // <F12> PROCMessage( FNStringCheckEqualB( "knud", "van" ) ) // gives FALSE RETURN( s1 == s2 ) END // library: string: get: escape <description>general output string to recognize an escape (e.g. in another routine). Central routine, only one occurrence of this constant string</description> <version>1.0.0.0.2</version> (filenamemacro=getstges.s) [kn, ri, sa, 05-12-1998 18:52:24] STRING PROC FNStringGetEscapeS() // e.g. PROC Main() // e.g. Message( FNStringGetEscapeS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( "<ESCAPE>" ) // END // library: string: get: input: filename: central <description>input a filename: central</description> <version>1.0.0.0.4</version> (filenamemacro=getstfce.s) [kn, zoe, mo, 14-06-1999 20:43:36] STRING PROC FNStringGetInputFilenameCentralS( STRING askS, STRING defaultS, INTEGER flagsI, INTEGER historyI ) // e.g. PROC Main() // e.g. Message( FNStringGetInputFilenameCentralS( "Filename =", "myfile.dok", 0, _EDIT_HISTORY_ ) ) // gives e.g. "myfile.dok" // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = defaultS // INTEGER escapeB = FNMathCheckInitializeNewBooleanFalseB() // escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, flagsI, historyI ) ) // // variation: escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, _FULL_PATH_ ) ) // // variation: escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, _MUST_EXIST_ ) ) // // variation: escapeB = FNMathCheckLogicNotB( AskFilename( askS, s, _WRITE_ACCESS_ ) ) // // or combinations of the 3 above TSE variables (e.g. _FULL_PATH_ | _MUST_EXIST_) // // see TSE help // IF ( escapeB AND FNStringCheckEmptyB( s ) ) // RETURN( FNStringGetEscapeS() ) // ENDIF // <Escape> was pressed, and you cleared the filename box in response // IF FNStringCheckEmptyB( s ) // RETURN( defaultS ) // // variation: IF FNMathCheckLogicNotB( FNStringGetLengthI( s ) ) ...) // ENDIF // <Enter> was pressed, in response // RETURN( s ) // response was entered // END // library: file: get: unzip: to: directory <description></description> <version control></version control> <version>1.0.0.0.8</version> (filenamemacro=getfitdj.s) [kn, ri, su, 06-12-2009 03:37:30] PROC PROCFileGetUnzipToDirectory( STRING fileNameS, STRING directoryS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "file: compare: all: directory: report: difference: fileNameS = ", "c:\temp\ddd1.zip" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "file: compare: all: directory: report: difference: directory = ", "c:\temp\DDD123\" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. PROCFileGetUnzipToDirectory( s1, s2 ) // e.g. END // e.g. // e.g. <F12> Main() // STRING temporaryDirectoryS[255] = "" // IF ( RightStr( directoryS, 1 ) == "\" ) // // Remove the backslash at the end, otherwise you must confirm manually deletion of all files in that directory (if you use the 'deltree.exe' program) // temporaryDirectoryS = LeftStr( directoryS, Length( directoryS ) - 1 ) // ELSE // temporaryDirectoryS = directoryS // ENDIF // // remove the temporary directory, then create it again // PROCProgramRunFileRemoveDirectoryDeltreeAlias( temporaryDirectoryS ) PROCFileCreateDirectoryNest( temporaryDirectoryS ) // // unzip the file into the directory // PROCProgramRunFileZipToDirectoryUnzipPkzipcAlias( fileNameS, temporaryDirectoryS, "" ) // END // library: file: compare: all: directory: report: difference <description></description> <version control></version control> <version>1.0.0.0.87</version> (filenamemacro=compfidd.s) [kn, ri, sa, 05-12-2009 18:38:35] PROC PROCFileCompareAllDirectoryReportDifference( STRING directory1S, STRING directory2S, STRING scriptFileNameS, STRING reportFileNameS, STRING caseS ) // e.g. DLL "<kernel32.dll>" // e.g. INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" // e.g. END // e.g. // // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "file: compare: directory: difference: directory1S = ", "c:\temp\ddd1" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "file: compare: directory: difference: directory2S = ", "c:\temp\ddd2" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. PROCFileCompareAllDirectoryReportDifference( s1, s2, "g:\utils\myscript.txt", "c:\temp\report.htm", "all" ) // e.g. END // e.g. // e.g. <F12> Main() // INTEGER bufferI = 0 // INTEGER I = 1 // PushPosition() bufferI = CreateTempBuffer() PopPosition() // PROCFileCompareAllDirectoryReport_DifferenceSub( directory1S, directory2S, scriptFileNameS, reportFileNameS, I, bufferI, caseS ) // GotobufferId( bufferI ) // END // library: string: get: history: input <description>input a string and store it in that specific history list</description> <version>1.0.0.0.2</version> (filenamemacro=getsthin.s) [kn, ni, mo, 03-08-1998 13:04:18] STRING PROC FNStringGetHistoryInputS( STRING infoS, STRING answerDefaultS, INTEGER historyI ) // e.g. PROC Main() // e.g. Message( FNStringGetHistoryInputS( "Please input something", "test", _FIND_HISTORY_ ) ) // gives e.g. "test" // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = answerDefaultS // INTEGER escapeB = FNMathCheckInitializeNewBooleanFalseB() // escapeB = FNMathCheckLogicNotB( FNHistoryCheckAskCentralB( infoS, s, historyI ) ) // IF ( escapeB ) // RETURN( FNStringGetEscapeS() ) // ENDIF // <Escape> was pressed, in response // IF FNStringCheckEmptyB( s ) AND FNStringCheckEmptyNotB( answerDefaultS ) // RETURN( FNStringGetEmptyS() ) // input of an empty string, user has removed the string to indicate that an empty string was wanted // ENDIF // IF FNStringCheckEmptyB( s ) // RETURN( answerDefaultS ) // ENDIF // <Enter> was pressed, in response (variation: IF FNMathCheckLogicNotB( MathGetStringLengthI( s ) ) ...) // removed FN because it gave problems compiling [kn, ri, sa, 16-02-2008 21:53:49] // RETURN( s ) // response was entered // END // library: initialize: check: new: boolean: false <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checinbf.s) [kn, ri, su, 22-07-2001 15:58:06] INTEGER PROC FNMathCheckInitializeNewBooleanFalseB() // e.g. PROC Main() // e.g. Message( FNMathCheckInitializeNewBooleanFalseB() ) // gives e.g. FALSE // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNMathCheckGetLogicFalseB() ) END // library: math: check: logic: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmaln.s) [kn, ri, tu, 15-05-2001 16:54:21] INTEGER PROC FNMathCheckLogicNotB( INTEGER B ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "math: check: logic: not: number = ", "1" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. Message( FNMathCheckLogicNotB( FNStringGetToIntegerI( s ) ) ) // e.g. END // e.g. // e.g. <F12> Main() RETURN( NOT B ) END // library: string: empty: is given string empty? [kn, ri, sa, 20-05-2000 20:11:08] INTEGER PROC FNStringCheckEmptyB( STRING s ) RETURN( FNStringCheckEqualB( s, FNStringGetEmptyS() ) ) END // library: program: run: file: remove: directory: deltree: alias <description></description> <version control></version control> <version>1.0.0.0.4</version> (filenamemacro=runprdao.s) [kn, ri, su, 06-12-2009 03:20:56] PROC PROCProgramRunFileRemoveDirectoryDeltreeAlias( STRING directoryS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "program: run: file: remove: directory: deltree: alias: directoryS = ", "c:\temp\DDD3" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. PROCProgramRunFileRemoveDirectoryDeltreeAlias( s1 ) // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = GetStrFromWinClip() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: remove: directory: deltree)" ) // PROCFileRun4NtAliasCommandListUser( Format( "deltree", " ", directoryS ) ) // END // library: file: create: directory: nest <description></description> <version control></version control> <version>1.0.0.0.6</version> (filenamemacro=creafido.s) [kn, am, fr, 24-04-2009 16:16:55] PROC PROCFileCreateDirectoryNest( STRING pathS ) // e.g. PROC Main() // e.g. STRING s1[255] = "c:\temp\d\d" // e.g. // using Ask() instead of AskFileName(), because when not found it will give warning file not found // e.g. IF ( NOT ( Ask( "file: create: directory: nest: pathS = ", s1, _EDIT_HISTORY_ ) ) AND ( Length( s1 ) > 0 ) ) RETURN() ENDIF // e.g. PROCFileCreateDirectoryNest( s1 ) // e.g. END // e.g. // e.g. <F12> Main() // IF ( FNMathCheckLogicNotB( FNFileCreateDirectoryNestB( pathS ) ) ) // // PROCWarn( Format( "Could not create directory", " ", pathS ) ) // ENDIF // END // library: program: run: file: unzip: pkzipc: alias <description></description> <version control></version control> <version>1.0.0.0.7</version> (filenamemacro=runprpam.s) [kn, ri, su, 06-12-2009 03:08:28] PROC PROCProgramRunFileZipToDirectoryUnzipPkzipcAlias( STRING fileNameZipS, STRING directoryS, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "program: run: file: unzip: pkzipc: alias: fileNameS = ", "c:\temp\ddd1.zip" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "program: run: file: unzip: pkzipc: alias: directoryS = ", "C:\TEMP\DDD3\" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: file: unzip: pkzipc: alias: parameterS = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunFileZipToDirectoryUnzipPkzipcAlias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: unzip: pkware: pkzipc)" ) // CopyToWinclip( fileNameZipS ) // PROCFileRun4NtAliasCommandListUser( Format( "pku", " ", fileNameZipS, " ", directoryS, " ", parameterS ) ) // END // library: file: compare: all: directory: report: difference: sub <description></description> <version>1.0.0.0.59</version> <version control></version control> (filenamemacro=compfids.s) [kn, ri, sa, 05-12-2009 18:38:35] PROC PROCFileCompareAllDirectoryReport_DifferenceSub( STRING directory1S, STRING directory2S, STRING scriptFileNameS, STRING reportFileNameS, INTEGER I, INTEGER buffer1I, STRING caseS ) // e.g. DLL "<kernel32.dll>" // e.g. INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" // e.g. END // e.g. // // e.g. PROC Main() // e.g. PROCFileCompareAllDirectoryReport_DifferenceSub( "c:\temp\ddd1", "c:\temp\ddd2", "f:\utils\myscript.txt", "c:\temp\report.htm", 1, CreateTempBuffer(), "all" ) // e.g. END // e.g. // e.g. <F12> Main() // INTEGER searchHandleI = FindFirstFile( Format( AddTrailingSlash( directory1S ), "*.*" ), -1 ) // STRING ffNameS[255] = "" // INTEGER directoryB = FALSE // STRING fileName1S[255] = "" // STRING fileName2S[255] = "" // STRING reportFileNameCurrentS[255] = "" // INTEGER buffer2I = 0 // INTEGER allB = EquiStr( caseS, "all" ) // // recursive stop // IF ( NOT ( searchHandleI == -1 ) ) // PushPosition() buffer2I = CreateTempBuffer() PopPosition() // REPEAT // ffNameS = FFName() // directoryB = FALSE // IF ( FFAttribute() & _DIRECTORY_ ) // directoryB = TRUE // IF ( NOT ( ffNameS == "." ) AND ( NOT ( ffNameS == ".." ) ) ) // // recursive call // PROCFileCompareAllDirectoryReport_DifferenceSub( AddTrailingSlash( Format( AddTrailingSlash( directory1S ), ffNameS ) ), directory2S, scriptFileNameS, reportFileNameS, I + 1, buffer1I, caseS ) // ENDIF // ENDIF // // only include filenames here (and do by design not include directories) // IF ( NOT ( directoryB ) ) // // do something // AddLine( Format( FFSize():-10, FFDateStr():-15, FFTimeStr():-10, directory1S:-50, ffNameS:-120 ), buffer1I ) // // build the filename (e.g. c:\mydirectory1\myfilename1) // fileName1S = Format( AddTrailingSlash( directory1S ), ffNameS ) // // Get all the corresponding file with the *same* filename and extension (e.g. ddd1.txt) in directory2 // (there might be more than one, in that case compare against all of them) // PROCFileSearchAllDirectoryWalkTheTree( ffNameS, directory2S ) // PROCFileSearchAllDirectoryWalkTheTreeSub( ffNameS, directory2S, buffer2I ) // GotoBufferId( buffer2I ) // BegFile() // WHILE ( ( NumLines() > 0 ) AND ( NOT ( LFind( "^$", "cgx" ) ) ) ) // PushPosition() // fileName2S = Trim( GetText( 1, 255 ) ) // IF FileExists( fileName1S ) AND FileExists( fileName2S ) // reportFileNameCurrentS = Format( SplitPath( reportFileNameS, _DRIVE_ | _PATH_ ), Str( I ):2:"0", SplitPath( reportFileNameS, _EXT_ ) ) // IF ( allB ) OR ( YesNo( Format( "Difference compare", " ", SplitPath( fileName1S, _NAME_ | _EXT_ ), " ", "<->", " ", SplitPath( fileName1S, _NAME_ | _EXT_ ), " ", "all", "?" ) ) == 1 ) // // You will have to replace this with your own search routines, file path and parameters // IF ( allB ) OR ( YesNo( "Do you want to run the Total Commander compare result?" ) == 1 ) // // StartPgm( "c:\totalcmd\totalcmd.exe", Format( "/S=C", " ", fileName1S, " ", fileName2S ) ) PROCProgramRunCompareTotalcommanderAlias( fileName1S, fileName2S, "/S=C" ) // ENDIF // ENDIF // IF ( NOT ( allB ) ) // IF ( YesNo( "Do you want to run other compare programs?" ) == 1 ) // IF ( YesNo( "Do you want to run the BeyondCompare compare result?" ) == 1 ) // PROCProgramRunFileCompare_BeyondcompareAlias( fileName1S, fileName2S, "" ) // // StartPgm( "C:\Program Files\Beyond Compare 3\BCompare.exe", Format( "@", SplitPath( scriptFileNameS, _NAME_ | _EXT_ ), " ", fileName1S, " ", fileName2S, " ", reportFileNameCurrentS ), SplitPath( scriptFileNameS, _DRIVE_ | _PATH_ ) ) // StartPgm( FNStringGetAlias4NtDefaultS( "beyondcompare" ), Format( "@", SplitPath( scriptFileNameS, _NAME_ | _EXT_ ), " ", fileName1S, " ", fileName2S, " ", reportFileNameCurrentS ), SplitPath( scriptFileNameS, _DRIVE_ | _PATH_ ) ) // StartPgm( FNStringGetFilenameAliasBeyondCompareS(), Format( "@", SplitPath( scriptFileNameS, _NAME_ | _EXT_ ), " ", fileName1S, " ", fileName2S, " ", reportFileNameCurrentS ), SplitPath( scriptFileNameS, _DRIVE_ | _PATH_ ) ) PROCProgramRunBeyondcompareParameter( fileName1S, fileName2S, scriptFileNameS, reportFileNameCurrentS, FNStringGetFilenameAliasBeyondcompareExecutableS() ) // IF ( YesNo( "Do you want to see the BeyondCompare report HTML result in your browser?" ) == 1 ) // // StartPgm( "C:\Program Files\Internet Explorer\iexplore.exe", reportFileNameCurrentS ) PROCProgramRunInternetBrowserAlias( reportFileNameCurrentS ) // ENDIF // IF ( YesNo( "Do you want to run the TotalCommander compare result?" ) == 1 ) // // StartPgm( "c:\totalcmd\totalcmd.exe", Format( "/S=C", " ", fileName1S, " ", fileName2S ) ) PROCProgramRunCompareTotalcommanderAlias( fileName1S, fileName2S, "/S=C" ) // ENDIF // IF ( YesNo( "Run UltraCompare?" ) == 1 ) PROCFileRun4NtAliasCommandListUser( Format( "ultracompare", " ", Format( QuotePath( fileName1S ), " ", QuotePath( fileName2S ) ), " ", "&&", " ", "exit" ) ) ENDIF // IF ( YesNo( "Do you want to run the Perforce P4merge.exe compare result?" ) == 1 ) // PROCProgramRunFileComparePerforceP4merge( fileName1S, fileName2S, "" ) // ENDIF // IF ( YesNo( "Run AraxisMerge?" ) == 1 ) PROCFileRun4NtAliasCommandListUser( Format( "araxismerge", " ", Format( QuotePath( fileName1S ), " ", QuotePath( fileName2S ) ), " ", "&&", " ", "exit" ) ) ENDIF // IF ( YesNo( "Do you want to run the Microsoft WinDiff compare result?" ) == 1 ) // // StartPgm( "f:\utils\windiff.exe", Format( fileName1S, " ", fileName2S ) ) PROCProgramRunCompareWindiffAlias( fileName1S, fileName2S, "" ) // ENDIF // IF ( YesNo( "Do you want to run the WinMerge compare result?" ) == 1 ) // // StartPgm( "c:\program files\winmerge\winmergeu.exe", Format( fileName1S, " ", fileName2S ) ) PROCProgramRunCompareWinmergeAlias( fileName1S, fileName2S, "" ) // ENDIF // IF ( YesNo( "Run TkDiff?" ) == 1 ) PROCFileRun4NtAliasCommandListUser( Format( "tkdiff", " ", Format( QuotePath( fileName1S ), " ", QuotePath( fileName2S ) ), " ", "&&", " ", "exit" ) ) ENDIF // IF ( YesNo( "Do you want to run the ExamDiff compare result?" ) == 1 ) // PROCProgramRunFileCompareExamdiffAlias( fileName1S, fileName2S, "" ) // ENDIF // IF ( YesNo( "Do you want to run the Csdiff compare result?" ) == 1 ) // PROCProgramRunFileCompareCsdiffAlias( fileName1S, fileName2S, "" ) // ENDIF // IF ( YesNo( "Do you want to run the Cygwin Diff.exe compare result?" ) == 1 ) // PROCFileCompareCygwinDiff( fileName1S, fileName2S ) // ENDIF // IF ( YesNo( "Do you want to run the GNU Diff.exe compare result?" ) == 1 ) PROCFileCompareGnuDiff( fileName1S, fileName2S ) ENDIF // IF ( YesNo( "Do you want to run the Microsoft fc.exe compare result?" ) == 1 ) // PROCFileCompareMicrosoftFc( fileName1S, fileName2S ) // ENDIF // IF ( YesNo( "Do you want to run the XML lint compare result?" ) == 1 ) // PROCFileCompareXmlDiff( fileName1S, fileName2S ) // ENDIF // // IF ( YesNo( "Do you want to run the KDiff3 compare result?" ) == 1 ) // PROCProgramRunCompareKdiff3Alias( fileName1S, fileName2S, "" ) // ENDIF // IF ( YesNo( "Run DiffZilla?" ) == 1 ) PROCFileRun4NtAliasCommandListUser( Format( "diffzilla", " ", Format( QuotePath( fileName1S ), " ", QuotePath( fileName2S ) ), " ", "&&", " ", "exit" ) ) ENDIF // ENDIF // ENDIF // ENDIF // PopPosition() // DelLine() // ENDIF // ENDWHILE // ENDIF // UNTIL ( NOT ( FindNextFile( searchHandleI, -1 ) ) ) // FindFileClose( searchHandleI ) // ENDIF // END // library: history: check: ask: central <description>input: ask: find history</description> <version>1.0.0.0.1</version> (filenamemacro=chechiac.s) [kn, ri, sa, 25-08-2001 20:34:13] INTEGER PROC FNHistoryCheckAskCentralB( STRING askS, VAR STRING answerDefaultS, INTEGER historyI ) // e.g. PROC Main() // e.g. STRING s[255] = "test" // e.g. Message( FNHistoryCheckAskCentralB( "Please input something", s, _FIND_HISTORY_ ) ) // gives e.g. "test" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( Ask( askS, answerDefaultS, historyI ) ) // END // library: string: check: empty: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checstep.s) [kn, ri, su, 21-05-2006 22:32:11] INTEGER PROC FNStringCheckEmptyNotB( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringCheckEmptyNotB( FNStringGetEmptyS() ) ) // gives e.g. FALSE // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNMathCheckLogicNotB( FNStringCheckEmptyB( s ) ) ) END // library: math: check: get: logic: false: wrapper <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalf.s) [kn, ri, su, 22-07-2001 15:43:08] INTEGER PROC FNMathCheckGetLogicFalseB() // e.g. PROC Main() // e.g. Message( FNMathCheckGetLogicFalseB() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FALSE ) END // library: file: run: 4: nt: alias: command: list: user <description></description> <version control></version control> <version>1.0.0.0.184</version> (filenamemacro=run4fira.s) [kn, ri, su, 01-03-2009 15:29:03] PROC PROCFileRun4NtAliasCommandListUser( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. INTEGER bufferI = 0 // e.g. INTEGER I = 0 // e.g. STRING fileNameS[255] = FNStringGetProgramAliasRunFilenameListS() // casealiasinputlist.txt // e.g. PushPosition() // e.g. bufferI = CreateTempBuffer() // e.g. GotoBufferId( bufferI ) // e.g. InsertFile( fileNameS ) // e.g. // I = List( "alias command", 115 - 21 ) // e.g. I = List( "FILE: RUN: 4NT: ALIAS: COMMAND: LIST: USER", FNWindowGetScreenWidthI() ) // e.g. IF ( NOT ( I == 0 ) ) // e.g. s1 = SubStr( GetText( 1, 255 ), 1, 188 - 1 ) // e.g. s1 = Trim( s1 ) // e.g. // combobox (but switched off as this is quicker) // e.g. // s1 = FNStringGetInputS( "file: run: 4nt: alias: s = ", s1 ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s1 = FNStringGetTagAngularRemoveWhileS( s1, "Please replace it by information to apply" ) // e.g. PROCFileRun4NtAliasCommandListUser( s1 ) // e.g. ENDIF // e.g. PopPosition() // e.g. PushPosition() // e.g. GotoBufferId( bufferI ) // e.g. AbandonFile() // e.g. PopPosition() // e.g. END // e.g. // e.g. <F12> Main() // e.g. <CTRL L> RepeatFind() // // PROCFileChangeEditProgramRunStringAdd( "run", "", Format( "(program: 4nt: alias: general:", " ", s, ")" ) ) // // LDos( QuotePath( FNStringGetProgram4ntFilenameS() ), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit && exit" ), _DONT_PROMPT_ ) // LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit && exit" ), _DONT_PROMPT_ ) // LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit" ), _DONT_PROMPT_ ) // LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", "/L", " ", "&&", " ", "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit" ), _DONT_PROMPT_ ) LDos( FNStringGetProgram4ntFilenameS(), Format( "alias", " ", FNStringGetPathFileAlias4Dos4NtFilenameS(), " ", "&&", " ", s, " ", "&& exit" ), _DONT_PROMPT_ ) // // PROCListSaveHistoryUser( s ) // old [kn, ri, su, 10-06-2012 13:44:33] // PROCMacroRunPurgeParameter( "runprmcn", Format( FNStringGetMachineNameS(), ";", FNStringGetUserNameFirstS(), ";", FNStringGetUserNameLastS(), ";", FNStringGetPortS(), ";", "Run%3A+Alias%3A+" + s + "&submit01=Create" ) ) // Message( Format( s, " ", ": file: run: 4nt/4dos: alias: command: list: user" ) ) // END // library: file: create: directory: nest <description></description> <version control></version control> <version>1.0.0.0.3</version> (filenamemacro=creafidn.s) [kn, ri, su, 19-04-2009 23:05:28] INTEGER PROC FNFileCreateDirectoryNestB( STRING pathS ) // e.g. PROC Main() // e.g. STRING s1[255] = "c:\temp\a\b\c" // e.g. // using Ask() instead of AskFileName(), because when not found it will give warning file not found // e.g. IF ( NOT ( Ask( "file: create: directory: nest: pathS = ", s1, _EDIT_HISTORY_ ) ) AND ( Length( s1 ) > 0 ) ) RETURN() ENDIF // e.g. Message( FNFileCreateDirectoryNestB( s1 ) ) // e.g. END INTEGER lengthI = Length( pathS ) // INTEGER I = 1 // INTEGER resultI = 0 // STRING dirNameS[255] = "" // STRING s[255] = SubStr( pathS, I, 1 ) // WHILE ( ( s <> "" ) AND ( I <= lengthI ) ) // IF ( ( s == "\" ) OR ( s == "/" ) ) // IF ( NOT ( SubStr( pathS, I - 1, 1 ) == ":" ) ) // IF ( NOT FNFileCheckDirectoryExistSimpleB( dirNameS ) ) // MkDir( dirNameS ) // ENDIF // ENDIF // ENDIF // dirNameS = dirNameS + s // I = I + 1 // s = SubStr( pathS, I, 1 ) // ENDWHILE // IF ( NOT FNFileCheckDirectoryExistSimpleB( dirNameS ) ) // resultI = MkDir( dirNameS ) // ENDIF // RETURN( resultI ) // END // library: file: search: all: directory: walk: the: tree <description></description> <version>1.0.0.0.6</version> (filenamemacro=searfitt.s) [kn, ri, su, 06-12-2009 00:51:06] PROC PROCFileSearchAllDirectoryWalkTheTree( STRING fileNameSearchS, STRING directoryS ) // e.g. PROC Main() // e.g. STRING s1[255] = "ddd1.txt" // e.g. STRING s2[255] = "c:\temp\ddd2" // e.g. IF ( ( Ask( "file: search: all: directory: walk: the: tree: searchS = ", s1, _EDIT_HISTORY_ ) ) AND ( Length( s1 ) > 0 ) ) // e.g. IF ( ( Ask( "file: search: all: directory: walk: the: tree: directoryS = ", s2, _EDIT_HISTORY_ ) ) AND ( Length( s2 ) > 0 ) ) // e.g. PROCFileSearchAllDirectoryWalkTheTree( s1, s2, CreateTempBuffer() ) // e.g. ENDIF // e.g. ENDIF // e.g. END // e.g. // e.g. <F12> Main() // INTEGER bufferI = 0 // PushPosition() bufferI = CreateTempBuffer() PopPosition() // PROCFileSearchAllDirectoryWalkTheTreeSub( fileNameSearchS, directoryS, bufferI ) // GotoBufferId( bufferI ) // END // library: file: search: all: directory: walk: the: tree: sub <description></description> <version>1.0.0.0.0</version> (filenamemacro=searfits.s) [kn, ri, su, 06-12-2009 00:53:50] PROC PROCFileSearchAllDirectoryWalkTheTreeSub( STRING fileNameSearchS, STRING directoryS, INTEGER bufferI ) // e.g. PROC Main() // e.g. PROCFileSearchAllDirectoryWalkTheTreeSub( "ddd1.txt", "c:\temp\ddd1", CreateTempBuffer() ) // e.g. END // e.g. // e.g. <F12> Main() // INTEGER searchHandleI = FindFirstFile( Format( AddTrailingSlash( directoryS ), "*.*" ), -1 ) // STRING ffNameS[255] = "" // INTEGER directoryB = FALSE // // recursive stop // IF ( NOT ( searchHandleI == -1 ) ) // REPEAT // ffNameS = FFName() // directoryB = FALSE // IF ( FFAttribute() & _DIRECTORY_ ) // directoryB = TRUE // IF ( NOT ( ffNameS == "." ) AND ( NOT ( ffNameS == ".." ) ) ) // // recursive call // PROCFileSearchAllDirectoryWalkTheTreeSub( fileNameSearchS, AddTrailingSlash( Format( AddTrailingSlash( directoryS ), ffNameS ) ), bufferI ) // ENDIF // ENDIF // // only include filenames here (and do by design not include directories) // IF ( NOT ( directoryB ) ) // // do something // IF ( Lower( fileNameSearchS ) == Lower( ffNameS ) ) // AddLine( Format( AddTrailingSlash( directoryS ), ffNameS ), bufferI ) // ENDIF // ENDIF // UNTIL ( NOT ( FindNextFile( searchHandleI, -1 ) ) ) // FindFileClose( searchHandleI ) // ENDIF // END // library: program: run: compare: totalcommander: alias <description></description> <version control></version control> <version>1.0.0.0.6</version> (filenamemacro=runprtan.s) [kn, ri, su, 06-12-2009 11:36:01] PROC PROCProgramRunCompareTotalcommanderAlias( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "program: run: compare: totalcommander: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "program: run: compare: totalcommander: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: compare: totalcommander: parameter = ", "/S=C" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunCompareTotalcommanderAlias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: totalcommander)" ) // PROCFileRun4NtAliasCommandListUser( Format( "totalcommander", " ", parameterS, " ", fileName1S, " ", fileName2S ) ) END // library: program: run: file: compare: beyondcompare: alias <description></description> <version control></version control> <version>1.0.0.0.11</version> (filenamemacro=runprcbe.s) [kn, am, tu, 29-09-2009 10:47:54] PROC PROCProgramRunFileCompare_BeyondcompareAlias( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "program: run: file: compare: beyondcompare: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "program: run: file: compare: beyondcompare: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: file: compare: beyondcompare: parameterS = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunFileCompare_BeyondcompareAlias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = GetStrFromWinClip() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: beyondcompare)" ) // PROCFileRun4NtAliasCommandListUser( Format( "beyondcompare", " ", parameterS, " ", fileName1S, " ", fileName2S ) ) END // library: program: run: beyondcompare: parameter <description></description> <version>1.0.0.0.8</version> <version control></version control> (filenamemacro=runprbpa.s) [kn, ri, su, 22-01-2012 19:31:06] PROC PROCProgramRunBeyondcompareParameter( STRING fileName1S, STRING fileName2S, STRING scriptFileNameS, STRING reportFileNameCurrentS, STRING fileNameExeS ) // e.g. PROC Main() // e.g. // // e.g. STRING s1[255] = FNStringGetFilenameAliasBeyondcompareExecutableS() // e.g. STRING s3[255] = "" // e.g. STRING s4[255] = "" // e.g. STRING s5[255] = "" // e.g. STRING s6[255] = "" // e.g. s3 = FNStringGetInputFilenameS( "file: compare: directory: difference: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. s4 = FNStringGetInputFilenameS( "file: compare: directory: difference: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s4 ) RETURN() ENDIF // e.g. s5 = FNStringGetInputFilenameS( "file: compare: directory: difference: scriptFilenameS = ", "g:\utils\myscript.txt" ) // script used by BeyondCompare // e.g. IF FNKeyCheckPressEscapeB( s5 ) RETURN() ENDIF // e.g. s6 = FNStringGetInputFilenameS( "file: compare: directory: difference: reportFilenameS = ", "c:\temp\report.htm" ) // report created by BeyondCompare // e.g. IF FNKeyCheckPressEscapeB( s6 ) RETURN() ENDIF // e.g. PROCProgramRunBeyondcompareParameter( s3, s4, s5, s6, s1 ) // e.g. END // e.g. // e.g. <F12> Main() // StartPgm( fileNameExeS, Format( "@", QuotePath( SplitPath( scriptFileNameS, _NAME_ | _EXT_ ) ), " ", QuotePath( fileName1S ), " ", QuotePath( fileName2S ), " ", QuotePath( reportFileNameCurrentS ) ), SplitPath( scriptFileNameS, _DRIVE_ | _PATH_ ) ) // PROCProgramRunInternetBrowserAlias( reportFileNameCurrentS ) // END // library: string: get: filename: alias: beyondcompare: executable <description></description> <version>1.0.0.0.1</version> <version control></version control> (filenamemacro=getstbcr.s) [kn, ri, su, 22-01-2012 19:23:25] STRING PROC FNStringGetFilenameAliasBeyondcompareExecutableS() // e.g. PROC Main() // e.g. Message( FNStringGetFilenameAliasBeyondcompareExecutableS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetAlias4NtDefaultS( "filecomparebeyondcompare" ) ) // END // library: program: run: internet: browser: alias <description></description> <version control></version control> <version>1.0.0.0.5</version> (filenamemacro=runprbam.s) [kn, ri, su, 06-12-2009 12:25:48] PROC PROCProgramRunInternetBrowserAlias( STRING s ) // e.g. PROC Main() // e.g. PROCProgramRunInternetBrowserAlias( "http://www.google.com" ) // e.g. END // e.g. // e.g. <F12> Main() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: browser: url)" ) // PROCFileRun4NtAliasCommandListUser( Format( "i", " ", s ) ) // END // library: program: run: file: compare: perforce: p4merge <description></description> <version control></version control> <version>1.0.0.0.5</version> (filenamemacro=runprpp4.s) [kn, ri, su, 13-12-2009 04:09:59] PROC PROCProgramRunFileComparePerforceP4merge( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "program: run: file: compare: beyondcompare: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "program: run: file: compare: beyondcompare: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: file: compare: perforce: p4merge: parameterS = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunFileComparePerforceP4merge( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = GetStrFromWinClip() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: perforce: p4merge)" ) // PROCFileRun4NtAliasCommandListUser( Format( "p4merge", " ", parameterS, " ", fileName1S, " ", fileName2S ) ) // END // library: program: run: compare: windiff: alias <description></description> <version control></version control> <version>1.0.0.0.6</version> (filenamemacro=runprwam.s) [kn, ri, su, 06-12-2009 11:33:29] PROC PROCProgramRunCompareWindiffAlias( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "program: run: compare: windiff: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "program: run: compare: windiff: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: compare: windiff: parameter = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunCompareWindiffAlias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: windiff)" ) // PROCFileRun4NtAliasCommandListUser( Format( "windiff", " ", fileName1S, " ", fileName2S, " ", parameterS ) ) END // library: program: run: compare: winmerge: alias <description></description> <version control></version control> <version>1.0.0.0.9</version> (filenamemacro=runprcwi.s) [kn, ri, 06-12-2009 11:20:20] PROC PROCProgramRunCompareWinmergeAlias( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "program: run: compare: winmerge: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "program: run: compare: winmerge: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "program: run: compare: winmerge: fileName2S = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunCompareWinmergeAlias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: winmerge)" ) // PROCFileRun4NtAliasCommandListUser( Format( "winmerge", " ", fileName1S, " ", fileName2S, " ", parameterS ) ) END // library: program: run: file: compare: examdiff: alias <description></description> <version control></version control> <version>1.0.0.0.5</version> (filenamemacro=runpreao.s) [kn, am, tu, 08-12-2009 15:25:06] PROC PROCProgramRunFileCompareExamdiffAlias( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "program: run: file: compare: examdiff: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "program: run: file: compare: examdiff: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: file: compare: examdiff: parameterS = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunFileCompareExamdiffAlias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = GetStrFromWinClip() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: examdiff)" ) // PROCFileRun4NtAliasCommandListUser( Format( "examdiff", " ", parameterS, " ", fileName1S, " ", fileName2S ) ) // END // library: program: run: file: compare: csdiff: alias <description></description> <version control></version control> <version>1.0.0.311</version> (filenamemacro=runprcam.s) [kn, ri, su, 13-12-2009 02:39:10] PROC PROCProgramRunFileCompareCsdiffAlias( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "program: run: file: compare: csdiff: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "program: run: file: compare: csdiff: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: file: compare: beyondcompare: parameterS = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunFileCompareCsdiffAlias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = GetStrFromWinClip() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: csdiff)" ) // PROCFileRun4NtAliasCommandListUser( Format( "csdiff", " ", parameterS, " ", fileName1S, " ", fileName2S ) ) // END // library: file: compare: cygwin: diff <description></description> <version control></version control> <version>1.0.0.0.18</version> (filenamemacro=compficd.s) [kn, ri, su, 07-10-2007 01:07:42] PROC PROCFileCompareCygwinDiff( STRING fileName1S, STRING fileName2S ) // e.g. DLL "<kernel32.dll>" // e.g. INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" // e.g. END // e.g. // // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "file: compare: cygwin: diff: filename: 1 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "file: compare: cygwin: diff: filename: 2 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. PROCFileCompareCygwinDiff( s1, s2 ) // e.g. END // PROCMacroRunCaptureTseCons3( FNStringGetShortFilenameS( QuotePath( FNStringGetFilenameCygwinDiffS() ) ), FNStringGetShortFilenameS( QuotePath( fileName1S ) ), FNStringGetShortFilenameS( QuotePath( fileName2S ) ) ) // PROCMacroRunCaptureTseCons3( FNStringGetShortFilenameS( QuotePath( FNStringGetAlias4NtDefaultS( "diffcygwin" ) ) ), FNStringGetShortFilenameS( QuotePath( fileName1S ) ), FNStringGetShortFilenameS( QuotePath( fileName2S ) ) ) PROCMacroRunCaptureTseCons3( FNStringGetAlias4NtDefaultS( "filecomparecygwindiff" ), FNStringGetShortFilenameS( QuotePath( fileName1S ) ), FNStringGetShortFilenameS( QuotePath( fileName2S ) ) ) // END // library: file: compare: gnu: diff <description></description> <version>1.0.0.0.3</version> <version control></version control> (filenamemacro=compfigd.s) [kn, am, we, 14-09-2011 21:59:15] PROC PROCFileCompareGnuDiff( STRING fileName1S, STRING fileName2S ) // e.g. DLL "<kernel32.dll>" // e.g. INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" // e.g. END // e.g. // // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "file: compare: cygwin: diff: filename: 1 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "file: compare: cygwin: diff: filename: 2 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. PROCFileCompareGnuDiff( s1, s2 ) // e.g. END // PROCMacroRunCaptureTseCons3( FNStringGetShortFilenameS( QuotePath( FNStringGetAlias4NtDefaultS( "filecomparegnudiff" ) ) ), FNStringGetShortFilenameS( QuotePath( fileName1S ) ), FNStringGetShortFilenameS( QuotePath( fileName2S ) ) ) // END // library: file: compare: microsoft: fc <description></description> <version control></version control> <version>1.0.0.0.4</version> (filenamemacro=compfimf.s) [kn, ri, sa, 11-08-2007 19:39:11] PROC PROCFileCompareMicrosoftFc( STRING fileName1S, STRING fileName2S ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "file: compare: microsoft: fc: filename: 1 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "file: compare: microsoft: fc: filename: 2 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. PROCFileCompareMicrosoftFc( s1, s2 ) // e.g. END // // PROCFileCompareMain( FNStringGetFilenameMicrosoftFcS(), QuotePath( fileName1S ), QuotePath( fileName2S ) ) PROCMacroRunCaptureTseCons3( QuotePath( FNStringGetAlias4NtDefaultS( "filecomparefcdiff" ) ), QuotePath( fileName1S ), QuotePath( fileName2S ) ) // END // library: file: compare: xml: diff <description></description> <version control></version control> <version>1.0.0.0.5</version> (filenamemacro=compfixd.s) [kn, ri, mo, 23-06-2008 00:45:40] PROC PROCFileCompareXmlDiff( STRING fileName1S, STRING fileName2S ) // e.g. DLL "<kernel32.dll>" // e.g. INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" // e.g. END // e.g. // // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputFilenameS( "file: compare: xml: difference: filename: 1 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputFilenameS( "file: compare: xml: difference: filename: 2 = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. PROCFileCompareXmlDiff( s1, s2 ) // e.g. END // STRING fileNameTemporary1S[255] = MakeTempName( "." ) // STRING fileNameTemporary2S[255] = MakeTempName( "." ) // Dos( FNStringGetCons4S( "c:\cygwin\bin\xmllint.exe --format", QuotePath( fileName1S ), ">", fileNameTemporary1S ), _DONT_PROMPT_ ) // Dos( FNStringGetCons4S( "c:\cygwin\bin\xmllint.exe --format", QuotePath( fileName2S ), ">", fileNameTemporary2S ), _DONT_PROMPT_ ) // PROCMacroRunCaptureTseCons3( FNStringGetShortFilenameS( FNStringGetFilenameCygwinDiffS() ), FNStringGetShortFilenameS( fileNameTemporary1S ), FNStringGetShortFilenameS( fileNameTemporary2S ) ) // EraseDiskFile( fileNameTemporary1S ) // EraseDiskFile( fileNameTemporary2S ) // END // library: program: run: compare: kdiff3: alias <description></description> <version control></version control> <version>1.0.0.0.4</version> (filenamemacro=runprkan.s) [kn, ri, su, 06-12-2009 11:56:48] PROC PROCProgramRunCompareKdiff3Alias( STRING fileName1S, STRING fileName2S, STRING parameterS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. STRING s3[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "program: run: compare: kdiff3: fileName1S = ", "c:\temp\ddd1.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "program: run: compare: kdiff3: fileName2S = ", "c:\temp\ddd2.txt" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. s3 = FNStringGetInputS( "program: run: compare: kdiff3: parameter = ", "" ) // e.g. IF FNKeyCheckPressEscapeB( s3 ) RETURN() ENDIF // e.g. PROCProgramRunCompareKdiff3Alias( s1, s2, s3 ) // e.g. END // e.g. // e.g. <F12> Main() // // PROCFileChangeEditProgramRunStringAdd( "run", "", "(program: file: compare: kdiff3)" ) // PROCFileRun4NtAliasCommandListUser( Format( "kdiff3", " ", parameterS, " ", fileName1S, " ", fileName2S ) ) END // library: string: get: program4nt <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgps.s) [kn, am, we, 29-04-2009 18:53:22] STRING PROC FNStringGetProgram4ntFilenameS() // e.g. PROC Main() // e.g. Message( FNStringGetProgram4ntFilenameS() ) // gives e.g. "f:\4dos\4nt.exe" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetFileIniDefaultS( "ProgramName4DosS" ) ) END // library: string: get: path: file: alias4: dos4: nt <description></description> <version control></version control> <version>1.0.0.0.3</version> (filenamemacro=getstdnx.s) [kn, am, we, 29-04-2009 18:54:58] STRING PROC FNStringGetPathFileAlias4Dos4NtFilenameS() // e.g. PROC Main() // e.g. Message( FNStringGetPathFileAlias4Dos4NtFilenameS() ) // gives e.g. "c:\4dos\alias.dok" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetFileIniDefaultS( "FNStringGetPathFileAlias4Dos4NtS" ) ) END // library: macro: run a macro, then purge it, pass parameter string [kn, ri, sa, 17-02-2001 02:22:27] PROC PROCMacroRunPurgeParameter( STRING macronameS, STRING commandlineparameterS ) // PROCMacroRunPurge( FNStringGetConsS( macronameS, commandlineparameterS ) ) // END // library: string: get: machine: name <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstmnc.s) [kn, ri, we, 16-06-2010 22:41:10] STRING PROC FNStringGetMachineNameS() // e.g. PROC Main() // e.g. Message( FNStringGetMachineNameS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetMachineNameS" ) ) // END // library: string: get: user: name: first <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstnfi.s) [kn, ri, we, 16-06-2010 22:40:16] STRING PROC FNStringGetUserNameFirstS() // e.g. PROC Main() // e.g. Message( FNStringGetUserNameFirstS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetUserNameFirstS" ) ) // END // library: string: get: user: name: last <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstnla.s) [kn, ri, we, 16-06-2010 22:40:40] STRING PROC FNStringGetUserNameLastS() // e.g. PROC Main() // e.g. Message( FNStringGetUserNameLastS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetUserNameLastS" ) ) // END // library: string: get: port: name <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getstpnc.s) [kn, ri, sa, 24-07-2010 21:52:33] STRING PROC FNStringGetPortS() // e.g. PROC Main() // e.g. Message( FNStringGetPortS() ) // gives e.g. "80" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNStringGetPortS" ) ) // END // library: file: check: check: directory: exist: simple <description></description> <version control></version control> <version>1.0.0.0.3</version> (filenamemacro=checdies.s) [kn, ri, sa, 02-05-2009 01:28:39] INTEGER PROC FNFileCheckDirectoryExistSimpleB( STRING s ) // e.g. PROC Main() // e.g. Message( FNFileCheckDirectoryExistSimpleB( "c:\temp\d\d\d" ) ) // gives e.g. FALSE if the directory does not exist // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FileExists( Format( AddTrailingSlash( s ), "*.*" ) ) ) // END // library: string: get: alias4: nt: default <description></description> <version>1.0.0.0.5</version> <version control></version control> (filenamemacro=getstndk.s) [kn, ri, fr, 21-01-2011 00:36:18] STRING PROC FNStringGetAlias4NtDefaultS( STRING aliasS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. // s1 = FNStringGetInputS( "string: get: alias4nt: s = ", "aliasr*efresh" ) // e.g. s1 = FNStringGetInputS( "string: get: alias4nt: s = ", "javadoc" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNStringGetAlias4NtDefaultS( s1 ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetAlias4NtS( aliasS, FNStringGetFilenameGetGlobalAliasS() ) ) // END // library: macro: run: capture: tse: cons3 <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runmatco.s) [kn, ri, sa, 18-08-2007 17:44:13] PROC PROCMacroRunCaptureTseCons3( STRING parameter1S, STRING parameter2S, STRING parameter3S ) // e.g. PROC Main() // e.g. PROCMacroRunCaptureTseCons3( "dir", "*.*", "" ) // e.g. END // e.g. // e.g. <F12> Main() PROCMacroRunCaptureTse( FNStringGetCons3S( parameter1S, parameter2S, parameter3S ) ) END // library: string: get: short: filename <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstsfi.s) (author: http://www.semware.com, see macro 'f.s' in directory '..\mac') [kn, ni, th, 02-10-2003 19:41:35] [api / dll] STRING PROC FNStringGetShortFilenameS( STRING lpszLongPath ) // e.g. #IF WIN32 // e.g. DLL "<kernel32.dll>" // e.g. INTEGER PROC GetShortPathName( STRING lpszLongPath : cstrval, VAR STRING lpszShortPath : strptr, INTEGER cchBuffer : long ): "GetShortPathNameA" // e.g. END // e.g. #ENDIF // e.g. // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "<info>: lpszLongPath = ", "c:\autoexec.bat.nb" ) // make sure this file exists on your computer // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Warn( FNStringGetShortFilenameS( s1 ) ) // e.g. END // e.g. // e.g. <F12> Main() #IFDEF WIN32 INTEGER h INTEGER lengthI STRING lpszShortPath[_MAXPATH_] = Format( "":_MAXPATH_:CHR( 0 ) ) h = IIF( FileExists( lpszLongPath ), -1, Fcreate( lpszLongPath ) ) lengthI = GetShortPathName( lpszLongPath, lpszShortPath, _MAXPATH_ ) IF h <> -1 Fclose( h ) EraseDiskFile( lpszLongPath ) ENDIF RETURN( IIF( lengthI > 0, lpszShortPath[1:Pos( CHR( 0 ), lpszShortPath ) - 1], lpszLongPath ) ) #ELSE Warn( "use 4DOS / 4NT and @SFN, to redirect to a file, then read first line of this file" ) #ENDIF END // library: string: get: cons4: string: concatenation: 4 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcz.s) [kn, zoe, fr, 17-11-2000 13:54:56] STRING PROC FNStringGetCons4S( STRING s1, STRING s2, STRING s3, STRING s4 ) // e.g. PROC Main() // e.g. Message( FNStringGetCons4S( "a", "b", "c", "d" ) ) // gives e.g. "a b c d" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConsS( FNStringGetCons3S( s1, s2, s3 ), s4 ) ) END // library: string: get: filename: cygwin: diff <description></description> <version control></version control> <version>1.0.0.0.2</version> (filenamemacro=getstcdm.s) [kn, ri, su, 07-10-2007 01:56:07] STRING PROC FNStringGetFilenameCygwinDiffS() // e.g. PROC Main() // e.g. Message( FNStringGetFilenameCygwinDiffS() ) // gives e.g. "c:\cygwin\bin\diff.exe" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetFileIniDefaultS( "FilenameCygwinDiffS" ) ) END // library: file: get: ini: default: central <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfiidf.s) [kn, ri, we, 31-12-2003 02:17:48] STRING PROC FNStringGetFileIniDefaultS( STRING searchS ) // e.g. PROC Main() // e.g. Message( FNStringGetFileIniDefaultS( "path4dos" ) ) // gives e.g. "c:\4dos" // e.g. END // e.g. // e.g. <F12> Main() // e.g. // USAGE // // 1. -Choose a filename for your global variables initialization file // // 1. -E.g. default name is here // // dddpath.ini // // 2. -You can set this name in a function in this library, if you // want to change the default name // // 3. -Save this file in the directory // (path chosen to be given by Microsoft Windows environment variable APPDATA) // // C:\Documents and Settings\<your Microsoft Windows login name>\Application Data\ // // 4. -The full path to your initialization file is thus e.g. // // C:\Documents and Settings\Administrator\Application Data\dddpath.ini // // 5. -To keep things as simple as possible, you need to put once // in top of your file the word (which must start at the beginning // of the line). Further no more '[' characters starting at the begin of any line. // // [default] // // 6. -This file contains 0 or more lines of the general format // // <variable name> = <variable value> // // 1. -E.g. // // [default] // // path4dos = c:\4dos // tsevariable1 = test1 // tsevariable2 = test2 // tsevariable3 = test3 // ... // // 2. -Note: you should/could put spaces before and after the '=' sign // (e.g. for backwards compatibility purposes) // // 7. -Using this library, you can then e.g. get the value of your global variable from this file RETURN( FNStringGetFileGetFilenamePathDefaultS( searchS ) ) END // library: macro: run a macro, then purge it (this text goes into the main macro file) [kn, zoe, tu, 27-10-1998 18:54:17] PROC PROCMacroRunPurge( STRING macronameS ) // e.g. PROC Main() // e.g. PROCMacroRunPurge( "mysubma1.mac myparameter11 myparameter12" ) // e.g. PROCMacroRunPurge( "mysubma2.mac myparameter21" ) // e.g. PROCMacroRunPurge( "mysubma3.mac myparameter31 myparameter32" ) // e.g. END IF FNStringCheckEmptyB( macronameS ) PROCError( "macro should not be empty" ) RETURN() ENDIF IF FNMacroCheckLoadB( FNStringGetCarS( macronameS ) ) // necessary if you pass parameters in a string PROCMacroExec( macronameS ) PROCMacroPurge( FNStringGetCarS( macronameS ) ) ENDIF // PROCFileInsertStringEndFilenameDefault( macronameS ) // if you want to count the frequency a certain macro has been called END // library: string: get: cons: string: concatenation: concatenation 2 words to 1 word (separated by a space) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcx.s) [kn, ri, we, 25-11-1998 20:15:03] STRING PROC FNStringGetConsS( STRING s1, STRING s2 ) // version with test if string empty // e.g. PROC Main() // e.g. Message( FNStringGetConsS( "knud", "van" ) ) // gives "knud van" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConcatSeparatorS( s1, s2, FNStringGetCharacterSymbolSpaceS() ) ) END // library: string: get: alias4: nt <description></description> <version control></version control> <version>1.0.0.0.8</version> (filenamemacro=getstanv.s) [kn, ri, mo, 04-08-2008 16:13:10] STRING PROC FNStringGetAlias4NtS( STRING aliasS, STRING fileNameS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. // s1 = FNStringGetInputS( "string: get: alias4nt: s = ", "aliasr*efresh" ) // e.g. s1 = FNStringGetInputS( "string: get: alias4nt: s = ", "javadoc" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "string: get: alias4nt: fileNameS = ", FNStringGetFilenameGetGlobalAliasS() ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNStringGetAlias4NtS( s1, s2 ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // STRING s[255] = "" // PushPosition() // IF ( NOT ( EditFile( QuotePath( fileNameS ) ) ) ) Warn( "could not find file ", " ", fileNameS ) RETURN( FNStringGetErrorS() ) ENDIF // IF ( NOT ( LFind( Format( "^", aliasS ), "giwx" ) ) ) Warn( "could not find alias", " ", s ) RETURN( FNStringGetErrorS() ) ENDIF // IF ( NOT ( LFind( " ", "c" ) ) ) Warn( "could not find any space after alias (=definition in begin of line). Expected at least 1 space after the alias definition.", " ", aliasS ) RETURN( FNStringGetErrorS() ) ENDIF // WHILE ( CurrChar() == Asc( " " ) ) Right() ENDWHILE // s = GetText( CurrPos(), 255 ) // s = Trim( s ) // EditFile( QuotePath( fileNameS ) ) AbandonFile() // PopPosition() // RETURN( s ) // END // library: string: get: filename: get: global: alias <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgam.s) [kn, ri, sa, 15-07-2006 23:12:14] STRING PROC FNStringGetFilenameGetGlobalAliasS() // e.g. PROC Main() // e.g. Message( FNStringGetFilenameGetGlobalAliasS() ) // gives e.g. "c:\4dos\alias.dok" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileIniDefaultS( "FNFilenameGetGlobalAliasS" ) ) RETURN( FNStringGetGlobalS( "filenamealiasGS" ) ) END // library: file: run: capture <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=runfircb.s) [kn, ho, we, 15-08-2007 12:00:07] PROC PROCMacroRunCaptureTse( STRING s ) // e.g. PROC Main() // e.g. PROCMacroRunCaptureTse( "dir" ) // e.g. END // e.g. // e.g. <F12> Main() PROCMacroRunPurge( FNStringGetConsS( "capture", s ) ) END // library: string: get: cons3: string: concatenation: 3 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcy.s) [kn, zoe, fr, 17-11-2000 13:52:07] STRING PROC FNStringGetCons3S( STRING s1, STRING s2, STRING s3 ) // e.g. PROC Main() // e.g. Message( FNStringGetCons3S( "a", "b", "c" ) ) // gives e.g. "a b c" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConsS( FNStringGetConsS( s1, s2 ), s3 ) ) END // library: file: get: filename: path: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfipde.s) [kn, ri, we, 31-12-2003 02:14:28] STRING PROC FNStringGetFileGetFilenamePathDefaultS( STRING searchS ) // e.g. PROC Main() // e.g. Message( FNStringGetFileGetFilenamePathDefaultS( "path4dos" ) ) // gives e.g. "c:\4dos" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( FNStringGetFileGetFilenamePathS( searchS, FNStringGetFilenameIniDefaultS() ) ) // [kn, ri, mo, 22-05-2006 23:59:52] RETURN( FNStringGetInitializationGlobalS( searchS, FNStringGetSectionSeparatorS(), FNStringGetFilenameIniDefaultS() ) ) END // library: error: central routine [kn, ni, mo, 03-08-1998 13:08:12] // INTEGER ErrorGB = FNMathCheckGetLogicFalseB() PROC PROCError( STRING s ) // e.g. <F12> PROCError( "this is an error" ) PROCTextSavePositionStackPush() // Alarm() // PROCWarn( s ) // Message( s ) // Message( "Linenr ", FNMathGetProgramLineNumberAbsoluteCurrentI(), ": ", s ) PROCWarnCons4( "Error: Linenr", FNStringGetLineNumberCurrentS(), ":", s ) // only when seriously: PROCFileInsertTextEnd( "line " + STR( FNMathGetProgramLineNumberAbsoluteCurrentI() ) + ": " + s, FNStringGetFilenameGlobalErrorS(), FNMathCheckGetLogicTrueB() ) PROCFileInsertTextEnd( "line " + STR( FNMathGetProgramLineNumberAbsoluteCurrentI() ) + ": " + s, FNStringGetFilenameGlobalErrorS(), FNMathCheckGetLogicTrueB() ) // errorGB = FNMathCheckGetLogicTrueB() PROCTextRemovePositionStackPop() END // library: macro: load: (Loads a Macro File From Disk Into Memory) R LoadMacro(STRING macro_filename)* [kn, zoe, we, 16-06-1999 01:07:06] INTEGER PROC FNMacroCheckLoadB( STRING macronameS ) RETURN( LoadMacro( macronameS ) ) END // library: string: get: word: token: get: first: FNStringGetCarS(): Get the first word of a string (words delimited by a space " " (=space delimited list)). <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgca.s) [kn, ni, su, 02-08-1998 15:54:17] STRING PROC FNStringGetCarS( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: get: word: token: get: first: s = ", "this is a test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNStringGetCarS( s1 ) ) // gives e.g. "this" // e.g. END // e.g. // e.g. <F12> Main() // // variation: RETURN( FNStringGetTokenFirstS( s, " " ) ) RETURN( GetToken( s, " ", 1 ) ) // faster, but not central END // library: macro: (Executes the Requested Macro) O ExecMacro([STRING macroname])* [kn, zoe, we, 16-06-1999 01:06:54] PROC PROCMacroExec( STRING macronameS ) // e.g. <F12> PROCMacroExec( "video" ) IF FNMathCheckLogicNotB( FNMacroCheckExecB( macronameS ) ) PROCWarnCons3( "macro", macronameS, ": could not be executed" ) ENDIF END // library: macro: (Purges a Macro File From Memory) R PurgeMacro(STRING s)* [kn, zoe, fr, 13-10-2000 19:09:32] PROC PROCMacroPurge( STRING macronameS ) // e.g. <F12> PROCMacroPurge( macronameS ) IF FNMathCheckLogicNotB( FNMacroCheckPurgeB( macronameS ) ) PROCWarnCons3( "macro", macronameS, ": could not be found" ) ENDIF END // library: string: get: concat: separator: string: concatenation: concatenate 2 words to 1 word, separated by separator <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcsg.s) [kn, zoe, th, 01-07-1999 01:33:18] STRING PROC FNStringGetConcatSeparatorS( STRING s1, STRING s2, STRING separatorS ) // e.g. PROC Main() // e.g. Message( FNStringGetConcatSeparatorS( "test1", "test2", " " ) ) // gives e.g. "tes1 test2" // e.g. END // e.g. // e.g. <F12> Main() IF FNStringCheckEmptyB( s1 ) RETURN( s2 ) ENDIF IF FNStringCheckEmptyB( s2 ) RETURN( s1 ) ENDIF RETURN( s1 + separatorS + s2 ) // leave this like this. Do not call a function, as this is a primitive function, you will get into a recursive loop, and get stack overflow END // library: string: get: character: symbol: " " <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstssp.s) [kn, zoe, we, 25-10-2000 01:33:39] STRING PROC FNStringGetCharacterSymbolSpaceS() // e.g. PROC Main() // e.g. Message( FNStringGetCharacterSymbolSpaceS() ) // gives " " // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterSymbolCentralS( 32 ) ) END // library: string: get: error <description>general output string to recognize an error (e.g. in another routine). Central routine, only one occurrence of this constant string</description> <version>1.0.0.0.1</version> <version control></version control> (filenamemacro=getstger.s) [kn, ri, sa, 05-12-1998 20:58:17] STRING PROC FNStringGetErrorS() // e.g. PROC Main() // e.g. Message( FNStringGetErrorS() ) // gives e.g. "<ERROR>" // e.g. END // RETURN( "<ERROR>" ) // END // library: string: global: get: get a global string [kn, zoe, mo, 14-06-1999 20:54:18] STRING PROC FNStringGetGlobalS( STRING stringglobalnameS ) // e.g. <F12> PROCMessage( FNStringGetGlobalS( "dirGS" ) ) // e.g. gives "c:\" // e.g. <F12> PROCMessage( FNStringGetGlobalS( "dir1GS" ) ) // indicates first that this string does not exist, and returns the result '<VARIABLE NOT KNOWN>'. STRING s[255] = FNStringGetInitializeNewStringS() IF FNMathCheckLogicNotB( ExistGlobalVar( stringglobalnameS ) ) PROCWarnCons5( "file", FNStringGetFilenameCurrentS(), ":", stringglobalnameS, ": this string is not known to this macro (suggestion: execute 'initglobal.mac' (or 'i.m') for this macro)" ) RETURN( FNStringGetErrorS() ) ENDIF s = GetGlobalStr( stringglobalnameS ) RETURN( s ) END // library: string: get: initialization: global <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstigl.s) [kn, ri, mo, 22-05-2006 23:44:33] STRING PROC FNStringGetInitializationGlobalS( STRING searchS, STRING sectionS, STRING fileNameS ) // e.g. PROC Main() // e.g. Message( FNStringGetInitializationGlobalS( "path4dos", "default", FNStringGetFilenameIniDefaultS() ) ) // e.g. gives "c:\4dos" // e.g. END // e.g. // e.g. <F12> Main() RETURN( GetProfileStr( sectionS, searchS, FNStringGetEmptyS(), fileNameS ) ) END // library: string: get: section: separator <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstssh.s) [kn, ri, mo, 22-05-2006 23:43:21] STRING PROC FNStringGetSectionSeparatorS() // e.g. PROC Main() // e.g. Message( FNStringGetSectionSeparatorS() ) // gives e.g. "default" // e.g. END // e.g. // e.g. <F12> Main() RETURN( "default" ) // you can not put this in the initialization file, because this actually determines the default section of that file itself. Possibly pass it as a command line parameter END // library: filename: get: filename: ini: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getfiide.s) [kn, ri, we, 31-12-2003 02:15:47] STRING PROC FNStringGetFilenameIniDefaultS() // e.g. PROC Main() // e.g. Message( FNStringGetFilenameIniDefaultS() ) // gives e.g. "c:\documents and settings\administrator\application data\dddpath.ini" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( "c:\dddpath.ini" ) RETURN( FNStringGetConcatS( FNStringGetPathUser_DataApplicationCurrentBackslashS(), FNStringGet_FilenameIniDefaultS() ) ) END // library: text: save: position: stack: push: store [kn, zoe, fr, 04-06-1999 23:01:00] PROC PROCTextSavePositionStackPush() // e.g. <F12> PROCTextSavePositionStackPush() PushPosition() // returns nothing // pushpopGT = pushpopGT + 1 // for checking purposes on the end of your routines. This must give 0 (as there as as many +1 as -1 in the OK case) END // library: error: warning: give a warning message via 4 strings [kn, ri, su, 29-07-2001 18:28:22] PROC PROCWarnCons4( STRING s1, STRING s2, STRING s3, STRING s4 ) PROCWarn( FNStringGetCons4S( s1, s2, s3, s4 ) ) END // library: string: get: line: number: current (return the current linenumber) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstncm.s) [kn, ni, mo, 02-08-1999 00:46:42] STRING PROC FNStringGetLineNumberCurrentS() // e.g. PROC Main() // e.g. Message( FNStringGetLineNumberCurrentS() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetMathIntegerToStringS( FNMathGetProgramLineNumberAbsoluteCurrentI() ) ) END // library: file: line: text: insert: end: goto the end of the given file, insert some text (when newlineB is TRUE, start every inserted line on a new line) [kn, ni, mo, 03-08-1998 13:08:29] PROC PROCFileInsertTextEnd( STRING s, STRING filenameS, INTEGER newlineB ) // e.g. <F12> PROCFileInsertTextEnd( "this is put on the end of the file", "myoutputfile", FNMathCheckGetLogicTrueB() ) PROCTextSavePositionStackPush() IF FNMathCheckLogicNotB( FNFileCheckEditMessageB( filenameS ) ) PROCTextRemovePositionStackPop() RETURN() ENDIF PROCFileGotoEnd() IF ( newlineB ) PROCFileInsertEndPrepare() ENDIF PROCTextInsert( s ) PROCTextRemovePositionStackPop() END // library: math: get: program: line: number: absolute: current <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getfincu.s) [kn, ni, mo, 02-08-1999 00:46:42] INTEGER PROC FNMathGetProgramLineNumberAbsoluteCurrentI() // e.g. PROC Main() // e.g. Message( FNMathGetProgramLineNumberAbsoluteCurrentI() ) // gives e.g. 332 if the cursor is on line 332 in the current file // e.g. END // e.g. // e.g. <F12> Main() | // | // ... // +--------------------------------------------------+| // | || // | || // | || // | || // | |V // |cursor is here on this line |--- <-- CurrLine() // | | // | | // |[end of file]-------------------------------------| // | | // | | // | | // | | // | | // | | // | | // | | // | | // | | // | | // +--------------------------------------------------+ // RETURN( CurrLine() ) // END // library: file: do: return name of current do file [kn, zoe, fr, 20-10-2000 23:34:48] STRING PROC FNStringGetFilenameGlobalErrorS() RETURN( FNStringGetGlobalS( "filenameerrorGS" ) ) END // library: math: check: get: logic: true: wrapper <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalt.s) [kn, ri, su, 22-07-2001 15:43:12] INTEGER PROC FNMathCheckGetLogicTrueB() // e.g. PROC Main() // e.g. Message( FNMathCheckGetLogicTrueB() ) // gives TRUE // e.g. END // e.g. // e.g. <F12> Main() RETURN( TRUE ) END // library: text: remove: position: stack: pop: restore [kn, zoe, fr, 04-06-1999 23:01:00] PROC PROCTextRemovePositionStackPop() // e.g. <F12> PROCTextRemovePositionStackPop() PopPosition() // returns nothing // pushpopGT = pushpopGT - 1 // for checking purposes on the end of your routines. This must give 0 (as there as as many +1 as -1 in the OK case) END // library: macro: (Executes the Requested Macro) O ExecMacro([STRING macroname])* [kn, zoe, we, 16-06-1999 01:06:54] INTEGER PROC FNMacroCheckExecB( STRING macronameS ) RETURN( ExecMacro( macronameS ) ) END // library: error: warning: give a warning message via 3 strings [kn, ri, su, 29-07-2001 18:24:52] PROC PROCWarnCons3( STRING s1, STRING s2, STRING s3 ) PROCWarn( FNStringGetCons3S( s1, s2, s3 ) ) END // library: macro: purge [kn, zoe, fr, 13-10-2000 19:03:50] INTEGER PROC FNMacroCheckPurgeB( STRING macronameS ) RETURN( PurgeMacro( macronameS ) ) END // library: string: get: character: symbol: central [kn, ri, sa, 07-07-2001 22:35:39] STRING PROC FNStringGetCharacterSymbolCentralS( INTEGER I ) RETURN( FNStringGetAsciiToCharacterS( I ) ) END // library: error: warning: give a warning message via 5 strings [kn, ri, su, 29-07-2001 18:57:23] PROC PROCWarnCons5( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) PROCWarn( FNStringGetCons5S( s1, s2, s3, s4, s5 ) ) END // library: file: filename: get: current: return current filename (as a string containing the complete path) (Get Full Name of Current Buffer) (nofilenamemacro) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstfcv.s) [kn, ni, sa, 08-08-1998 00:02:37] [FNfilenamecurrent] STRING PROC FNStringGetFilenameCurrentS() // e.g. PROC Main() // e.g. Message( FNStringGetFilenameCurrentS() ) // gives e.g. "c:\wordproc\tse\ddd.ddd" // e.g. END // e.g. // e.g. <F12> Main() RETURN( CurrFilename() ) END // library: string: get: concat <description>concatenation 2 words tot 1 word</description> <version>1.0.0.0.1</version> (filenamemacro=getstgch.s) [kn, zoe, th, 01-02-2001 19:32:49] STRING PROC FNStringGetConcatS( STRING s1, STRING s2 ) // version with test if string empty // e.g. PROC Main() // e.g. Message( FNStringGetConcatS( "test1", "test2" ) ) // version with test if string empty ) // gives e.g. "test1test2" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConcatSeparatorS( s1, s2, FNStringGetEmptyS() ) ) END // library: string: get: path: user: data: application: current: backslash <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstcbe.s) [kn, ri, sa, 21-02-2004 23:01:06] STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashS() // e.g. PROC Main() // e.g. Message( FNStringGetPathUser_DataApplicationCurrentBackslashS() ) // gives e.g. "c:\documents and settings\administrator\application data\" (this is a hidden directory) // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetFilenameEndBackSlashNotEqualInsertEndS( FNStringGetPathUser_DataApplicationCurrentBackslashNotS() ) ) END // library: string: get: filename: ini: default <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstide.s) [kn, ri, sa, 21-02-2004 22:54:12] STRING PROC FNStringGet_FilenameIniDefaultS() // e.g. PROC Main() // e.g. Message( FNStringGet_FilenameIniDefaultS() ) // gives e.g. "dddpath.ini" // e.g. END // e.g. // e.g. <F12> Main() RETURN( "dddpath.ini" ) // you can not put this in the global initialization file, because this actually determines the name of that file itself. You could overrule this by passing the filename as a parameter on the command line. (if ( parameter is empty ) then ( defaultfilename = dddpath.ini ), else ( defaultfilename = <that command line parameter> ) ) END // library: error: warning: give a warning message [kn, zoe, we, 09-06-1999 22:11:07] PROC PROCWarn( STRING s ) // e.g. <F12> PROCWarn( "you have forgotten to input a value" ) Warn( s ) END // library: string: get: math: get: integer: to: convert an integer to a string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getsttsu.s) [kn, ni, mo, 03-08-1998 00:34:05] / [number to string] STRING PROC FNStringGetMathIntegerToStringS( INTEGER i ) // e.g. PROC Main() // e.g. Message( FNStringGetMathIntegerToStringS( 3 ) ) // gives e.g. "3" // e.g. END // e.g. // e.g. <F12> Main() RETURN( Str( i ) ) END // library: file: edit: edit a file, with test of problems <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checficf.s) [kn, ni, mo, 03-08-1998 13:08:39] INTEGER PROC FNFileCheckEditMessageB( STRING filenameS ) // e.g. PROC Main() // e.g. Message( FNFileCheckEditMessageB( "" ) ) // gives e.g. TRUE when file loaded without problems // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNFileCheckEditCentralMessageB( filenameS, FNMathCheckGetLogicTrueB() ) ) END // library: file: movement: end: goto end of file: moves to the end of the last line of current file <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotofien.s) [kn, ri, su, 28-03-1999 01:08:06] PROC PROCFileGotoEnd() // e.g. PROC Main() // e.g. PROCFileGotoEnd() // e.g. END // e.g. // e.g. <F12> Main() IF FNMathCheckLogicNotB( FNFileCheckGotoEndB() ) // PROCWarn( "cursor was already in end file else error: could no go to end of file" ) ENDIF END // library: file: insert: prepare for the insertion (e.g. of text, of a new file, ...) [kn, zoe, th, 25-01-2001 18:03:46] PROC PROCFileInsertEndPrepare() PROCFileGotoEnd() PROCLineInsertAfter() PROCTextGotoLineBegin() END // library: text: insert: insert text <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=insetein.s) [kn, ni, mo, 10-08-1998 06:26:51] PROC PROCTextInsert( STRING s ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "which text to insert at current position = ", FNStringGetEmptyS() ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. PROCTextInsert( s ) // e.g. END // e.g. // e.g. <F12> Main() IF FNStringCheckEmptyB( s ) // PROCerror( FNStringGetFilenameCurrentS() + ": Attempt made to insert an empty string" ) RETURN() ENDIF IF FNMathCheckLogicNotB( FNTextCheckInsertB( s ) ) PROCerror( FNStringGetCons4S( FNStringGetFilenameCurrentS(), ": Text '", s, "' could not be inserted" ) ) ENDIF END // library: string: get: ascii: to: character (given the ASCII value, what is the corresponding character? (Get Single Character Equivalent of an Integer). Syntax: Chr(INTEGER i)*) <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=getsttch.s) [kn, zoe, we, 16-06-1999 01:06:51] STRING PROC FNStringGetAsciiToCharacterS( INTEGER asciiI ) // e.g. PROC Main() // e.g. Warn( FNStringGetAsciiToCharacterS( 65 ) ) // gives "A" // e.g. Warn( FNStringGetAsciiToCharacterS( 66 ) ) // gives "B" // e.g. Warn( FNStringGetAsciiToCharacterS( 100 ) ) // gives "d" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( Chr( asciiI ) ) // leave this keyword, otherwise possibly recursive stack overflow // END // library: string: get: cons5: string: concatenation: 5 strings <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgcb.s) [kn, zoe, fr, 17-11-2000 13:55:03] STRING PROC FNStringGetCons5S( STRING s1, STRING s2, STRING s3, STRING s4, STRING s5 ) // e.g. PROC Main() // e.g. Message( FNStringGetCons5S( "a", "b", "c", "d", "e" ) ) // gives e.g. "a b c d e" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConsS( FNStringGetCons4S( s1, s2, s3, s4 ), s5 ) ) END // library: string: get: filename: end: back: slash: not: equal: insert: end <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstiep.s) [kn, ni, su, 17-08-2003 00:24:04] STRING PROC FNStringGetFilenameEndBackSlashNotEqualInsertEndS( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringGetFilenameEndBackSlashNotEqualInsertEndS( 'c:\temp\ddd' ) ) // gives e.g. a string 'c:\temp\ddd\' (so with always a string with a backslash '\' at the end) // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterEndBackSlashNotEqualInsertEndS( s ) ) END // library: string: get: path: user: data: application: current <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstacu.s) [kn, ri, sa, 21-02-2004 22:50:55] STRING PROC FNStringGetPathUser_DataApplicationCurrentBackslashNotS() // e.g. PROC Main() // e.g. Message( FNStringGetPathUser_DataApplicationCurrentBackslashNotS() ) // gives e.g. "c:\documents and settings\administrator\application data" (this is a hidden directory) // e.g. END // e.g. // e.g. <F12> Main() STRING s[255] = FNStringGetEnvironmentS( "APPDATA" ) IF FNStringCheckEnvironmentFoundNotB( s ) PROCWarnCons3( "current user path to application data", s, ": not found" ) s = FNStringGetErrorS() ENDIF RETURN( s ) END // library: file: check: edit: message <description></description> <version control></version control> <version>1.0.0.0.1</version> (filenamemacro=central.s) [kn, ho, mo, 17-04-2006 17:41:21] INTEGER PROC FNFileCheckEditCentralMessageB( STRING filenameS, INTEGER messageB ) // e.g. PROC Main() // e.g. Message( FNFileCheckEditCentralMessageB( "test.dok", FNMathCheckGetLogicFalseB() ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() INTEGER editfileB = FNMathCheckGetLogicFalseB() // STRING s[255] = "" // if FNStringCheckEmptyB( filenameS ) // editfileB = EditFile() // ELSE // editfileB = EditFile( filenameS ) // ENDIF // IF FNMathCheckLogicNotB( editfileB ) // IF messageB // PROCErrorFileNotFound( filenameS ) // ENDIF // ENDIF // s = CurrFileName() PROCMacroRunPurgeParameter( "runprmcn", Format( FNStringGetMachineNameS(), ";", FNStringGetUserNameFirstS(), ";", FNStringGetUserNameLastS(), ";", FNStringGetPortS(), ";", "TSE%3A+File%3A+Load%3A+" + s + "&submit01=Create" ) ) // RETURN( editfileB ) // END // library: file: movement: end: goto end of file: moves to the end of the last line of current file [kn, ri, su, 28-03-1999 01:08:06] INTEGER PROC FNFileCheckGotoEndB() // e.g. <F12> PROCMessage( FNFileCheckGotoEndB() ) RETURN( EndFile() ) END // library: line: insert: inserts 1 line after current line. The cursor is placed on the newly created line. The cursor column does not change <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=inseliaf.s) [kn, ni, mo, 03-08-1998 13:35:30] PROC PROCLineInsertAfter() // e.g. PROC Main() // e.g. PROCLineInsertAfter() // e.g. END // e.g. // e.g. <F12> Main() PROCLineInsertAfterLineGotoBeginTextInsert( FNStringGetEmptyS() ) END // library: text: goto: line: begin // goto begin of line (=column 1 of the current line). If the cursor is already at the beginning of the current line, zero is returned. See also: EndLine() <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=gotolibe.s) [kn, zoe, th, 17-06-1999 00:12:52] PROC PROCTextGotoLineBegin() // library: line: movement: begin: // e.g. PROC Main() // e.g. PROCTextGotoLineBegin() // e.g. END // e.g. // e.g. <F12> Main() IF FNMathCheckLogicNotB( FNLineCheckGotoBeginB() ) // PROCWarn( "Could not go to the beginning of the current line" ) ENDIF END // library: text: insert: insert text [kn, zoe, tu, 23-11-1999 20:30:45] INTEGER PROC FNTextCheckInsertB( STRING s ) RETURN( FNTextCheckInsertCentralB( s, _INSERT_ ) ) END // library: string: get: backslash: if last character is not equal to '\', then concatenate a backslash to the end of the given string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstien.s) [kn, ri, sa, 24-02-2001 23:48:15] STRING PROC FNStringGetCharacterEndBackSlashNotEqualInsertEndS( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: get: backslash: if: not equal insert end: string = ", "this is a string without a backslash at end" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNStringGetCharacterEndBackSlashNotEqualInsertEndS( s1 ) ) // gives e.g. "this is a string with a backslash at end\" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterInsertEndIfEqualNotS( s, FNStringGetCharacterSymbolSlashBackwardS() ) ) END // library: environment: string: get (Searches for and Returns a Specified Environment Str) R GetEnvStr(STRING s)* <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgen.s) [kn, ri, th, 25-10-2001 01:44:48] STRING PROC FNStringGetEnvironmentS( STRING s ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInputS( "value: environment variable = ", "windir" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. PROCMessageCons3( s, "=", FNStringGetEnvironmentS( s ) ) // gives e.g. "windir=C:\WINNT", when working on a Windows2000 machine // e.g. END // e.g. // e.g. <F12> Main() STRING valueS[255] = GetEnvStr( s ) IF FNStringCheckEmptyB( valueS ) PROCMessageCons3( "environment variable", s, ": not found" ) valueS = FNStringGetErrorS() ENDIF RETURN( valueS ) END // library: environment: check: found: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checenfn.s) [kn, ri, sa, 27-05-2006 20:20:03] INTEGER PROC FNStringCheckEnvironmentFoundNotB( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringCheckEnvironmentFoundNotB( FNStringGetEmptyS() ) ) // gives TRUE (thus not found) because string empty (or string error string) // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringCheckEqualErrorOrEmptyB( s ) ) END // library: error: file: not: found <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=fileernf.s) [kn, ri, we, 28-02-2001 23:02:12] PROC PROCErrorFileNotFound( STRING filenameS ) // e.g. PROC Main() // e.g. PROCErrorFileNotFound( "xsefadafadfasdf.sdfa" ) // e.g. END // e.g. // e.g. <F12> Main() STRING s[255] = FNStringGetInitializeNewStringS() IF FNErrorCheckEscapeB( filenameS ) s = FNStringGetConsS( FNStringGetEscapeS(), "has been pressed" ) ELSE s = FNStringGetCons3S( "file: ", filenameS, "not found / path does not exist" ) ENDIF PROCError( s ) END // library: line insert after: insert text at first column (text: insert: after each other) [kn, zoe, we, 28-02-2001 20:24:53] PROC PROCLineInsertAfterLineGotoBeginTextInsert( STRING s ) // variation: PROCLineInsertAfter() PROCLineGotoBeginTextInsert( s ) IF FNMathCheckLogicNotB( FNLineCheckInsertAfterLineGotoBeginTextInsertB( s ) ) // PROCWarn( "line could not be inserted" ) ENDIF END // library: line: check: goto: begin <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checligb.s) [kn, ni, mo, 03-08-1998 13:36:31] INTEGER PROC FNLineCheckGotoBeginB() // version not central // e.g. PROC Main() // e.g. Message( "Goto the beginning of the line = ", FNLineCheckGotoBeginB() ) // e.g. END // e.g. // e.g. <F12> Main() RETURN( BegLine() ) END // library: text: insert: insert text: central [kn, ri, fr, 16-02-2001 22:00:44] INTEGER PROC FNTextCheckInsertCentralB( STRING s, INTEGER optionB ) RETURN( InsertText( s, optionB ) ) END // library: compare if string end is equal, if not so insert that string at the end <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstenp.s) [kn, ri, sa, 24-02-2001 23:06:33] STRING PROC FNStringGetCharacterInsertEndIfEqualNotS( STRING inS, STRING tailS ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: insert: insert: string = ", "c:\kee" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "string: insert: insert: frontS = ", "\" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNStringGetCharacterInsertEndIfEqualNotS( s1, s2 ) ) // gives e.g. "c:\kee\" // e.g. END // e.g. // e.g. <F12> Main() // e.g. // <F12> PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c", ":" ) ) // gives "c:" // e.g. // <F12> PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c:", ":" ) ) // gives "c:" // e.g. // <F12> PROCMessage( FNStringGetCharacterInsertEndIfEqualNotS( "c:\kee", FNStringGetCharacterSymbolSlashBackwardS() ) ) // gives "c:\kee\" STRING s[255] = inS IF FNMathCheckLogicNotB( FNStringCheckEqualCharacterLastNB( s, tailS ) ) // s = FNStringGetConcatS( s, tailS ) s = FNStringGetConcatTailS( s, tailS ) ENDIF RETURN( s ) END // library: string: get: character: symbol: "\" <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstsba.s) [kn, ri, su, 29-07-2001 15:41:11] STRING PROC FNStringGetCharacterSymbolSlashBackwardS() // e.g. PROC Main() // e.g. Message( FNStringGetCharacterSymbolSlashBackwardS() ) // gives "\" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetCharacterSymbolCentralS( 92 ) ) END // library: message: via 3 strings [kn, ri, su, 29-07-2001 18:24:52] PROC PROCMessageCons3( STRING s1, STRING s2, STRING s3 ) PROCMessage( FNStringGetCons3S( s1, s2, s3 ) ) END // library: environment: check: found: not <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checenfn.s) [kn, ri, sa, 27-05-2006 20:20:03] INTEGER PROC FNStringCheckEqualErrorOrEmptyB( STRING s ) // e.g. PROC Main() // e.g. Message( FNStringCheckEqualErrorOrEmptyB( FNStringGetEmptyS() ) ) // gives TRUE if string empty or string equals error string // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNMathCheckLogicOrB( FNErrorCheckSB( s ), FNStringCheckEmptyB( s ) ) ) END // library: escape or error [kn, zoe, th, 09-11-2000 23:18:32] INTEGER PROC FNErrorCheckEscapeB( STRING s ) IF FNErrorCheckSB( s ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF IF FNKeyCheckPressEscapeB( s ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF RETURN( FNMathCheckGetLogicFalseB() ) END // library: line insert after: insert text at first column <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=inseliti.s) [kn, zoe, we, 28-02-2001 20:24:53] INTEGER PROC FNLineCheckInsertAfterLineGotoBeginTextInsertB( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "line insert after: insert text at first column: s = ", "test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNLineCheckInsertAfterLineGotoBeginTextInsertB( s1 ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() // RETURN( AddLine( s ) ) RETURN( FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( s, FNBufferGetBufferIdFileCurrentI() ) ) END // library: string: word: equal: last: compare if a given string is equal at the end to another given string <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checstln.s) [kn, zoe, we, 29-11-2000 19:08:34] INTEGER PROC FNStringCheckEqualCharacterLastNB( STRING s, STRING tailS ) // version: first parameter s then endS // e.g. PROC Main() // e.g. Message( FNStringCheckEqualCharacterLastNB( "knud", "d" ) ) // gives TRUE // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringCheckEqualB( FNStringGetRightStringLengthEqualS( s, tailS ), tailS ) ) END // library: string: get: concat: tail: suffix <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstctb.s) [kn, ri, su, 02-09-2001 03:08:08] STRING PROC FNStringGetConcatTailS( STRING s, STRING tailS ) // e.g. PROC Main() // e.g. Message( FNStringGetConcatTailS( "Knu", "d" ) ) // gives e.g. "Knud" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetConcatS( s, tailS ) ) END // library: message: (Write Specified Expression(s) on Editor Status Line) R Message(expr [, expr2]...)* [kn, zoe, we, 16-06-1999 01:07:07] PROC PROCMessage( STRING s ) Message( s ) END // library: math: check: logic: or: 2 arguments <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checmalo.s) [kn, ri, tu, 15-05-2001 16:54:17] INTEGER PROC FNMathCheckLogicOrB( INTEGER B1, INTEGER B2 ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "math: check: logic: or: number1 = ", "1" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "math: check: logic: or: number2 = ", "1" ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNMathCheckLogicOrB( FNStringGetToIntegerI( s1 ), FNStringGetToIntegerI( s2 ) ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() IF ( B1 ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF // IF ( B2 ) RETURN( FNMathCheckGetLogicTrueB() ) ENDIF // RETURN( FNMathCheckGetLogicFalseB() ) END // library: error: test if an error occurred, via testing the output // version with testing local variable. Better. [kn, ni, we, 05-08-1998 20:27:34] INTEGER PROC FNErrorCheckSB( STRING s ) // e.g. <F12> PROCMessage( FNErrorCheckSB( "this is an error" ) // version with testing local variable. Better. ) // gives ... RETURN( FNStringCheckEqualB( s, FNStringGetErrorS() ) ) END // library: file: check: insert: line: after: line: goto: begin: text: insert: line insert after: insert text at first column (Add Line After Current Line). Syntax: AddLine( [STRING text [, INTEGER bufferid ] ] ). If the optional bufferid is specified, the line is added after the current line in the specified buffer. _ON_CHANGING_FILES_ hooks are not invoked by this command <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=checfiti.s) [kn, zoe, we, 28-02-2001 20:24:53] INTEGER PROC FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( STRING s, INTEGER bufferid ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. STRING s2[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "line insert after: insert text at first column: s = ", "test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. s2 = FNStringGetInputS( "line insert after: insert text at first column: bufferID = ", FNStringGetMathIntegerToStringS( FNBufferGetBufferIdFileCurrentI() ) ) // e.g. IF FNKeyCheckPressEscapeB( s2 ) RETURN() ENDIF // e.g. Message( FNFileCheckInsertLineAfterLineGotoBeginTextInsertB( s1, FNStringGetToIntegerI( s2 ) ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( AddLine( s, bufferid ) ) // s is the string that will be inserted at column 1 of the newly created line. BufferidI is the optional id of the file where the line is to be added. If not passed, the line is added to the current file. END // library: buffer: get: id: current ((Returns the Unique Id of Requested or Current Buffer) O GetBufferId([STRING name])*) <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getbuicu.s) [kn, zoe, th, 25-01-2001 11:12:56] INTEGER PROC FNBufferGetBufferIdFileCurrentI() // e.g. PROC Main() // e.g. Message( FNBufferGetBufferIdFileCurrentI() ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNBufferGetBufferIdGivenBufferNameI( FNStringGetFilenameCurrentS() ) ) END // library: STRING: get: right: string: length: equal <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstler.s) [kn, ni, su, 30-11-2003 23:32:40] STRING PROC FNStringGetRightStringLengthEqualS( STRING s, STRING tailS ) // e.g. PROC Main() // e.g. Message( FNStringGetRightStringLengthEqualS( "Knud van Eeden", "12345" ) ) // gives e.g. "Eeden" // e.g. END // e.g. // e.g. <F12> Main() RETURN( FNStringGetRightStringS( s, FNStringGetLengthI( tailS ) ) ) END // library: buffer: get: buffer: id: given: buffer: name (Returns the Unique Id of Requested or Current Buffer) O GetBufferId([STRING name])* <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getbubna.s) [kn, zoe, th, 25-01-2001 11:12:23] INTEGER PROC FNBufferGetBufferIdGivenBufferNameI( STRING bufferNameS ) // e.g. PROC Main() // e.g. Message( FNBufferGetBufferIdGivenBufferNameI( "test" ) ) // gives e.g. ..."" // e.g. END // e.g. // e.g. <F12> Main() RETURN( GetBufferId( bufferNameS ) ) END // library: string: get: word: token: last: return a given integer amount of characters from the right of a given string (=RIGHT$ in BASIC) <description></description> <version control></version control> <version>1.0.0.0.4</version> (filenamemacro=stririrs.s) [kn, ri, tu, 13-10-1998 20:05:49] STRING PROC FNStringGetRightStringS( STRING s, INTEGER totalI ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. STRING charactertotalS[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "string: word: token: get: right: string = ", "knud" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. charactertotalS = FNStringGetInputS( "string: word: token: get: right: character total = ", "2" ) // e.g. IF FNKeyCheckPressEscapeB( charactertotalS ) RETURN() ENDIF // e.g. Message( FNStringGetRightStringS( s, FNStringGetToIntegerI( charactertotalS ) ) ) // gives e.g. "kn" // e.g. END // e.g. // e.g. <F12> Main() // // e.g. // <F12> PROCMessage( FNStringGetRightStringS( "knud", 1 ) ) // gives "d" // e.g. // <F12> PROCMessage( FNStringGetRightStringS( "knud", 2 ) ) // gives "ud" // e.g. // <F12> PROCMessage( FNStringGetRightStringS( "best", 3 ) ) // gives "est" // INTEGER lengthI = FNStringGetLengthI( s ) // IF FNMathCheckLogicNotB( ( ( 0 <= totalI ) AND ( totalI <= lengthI ) ) ) // if not between 0 and length( string ), return the whole given string // totalI = lengthI // ENDIF // RETURN( FNStringGetMidStringS( s, 1 + lengthI - totalI, lengthI ) ) // END // library: string: line: length: what is the length <description></description> <version control></version control> <version>1.0.0.0.0</version> (filenamemacro=getstgle.s) [kn, ri, we, 25-11-1998 20:20:58] INTEGER PROC FNStringGetLengthI( STRING s ) // e.g. PROC Main() // e.g. STRING s1[255] = FNStringGetInitializeNewStringS() // e.g. s1 = FNStringGetInputS( "string: line: length: string = ", "this is a test" ) // e.g. IF FNKeyCheckPressEscapeB( s1 ) RETURN() ENDIF // e.g. Message( FNStringGetLengthI( s1 ) ) // gives e.g. 14 // e.g. END // e.g. // e.g. <F12> Main() // // e.g. // <F12> Message( FNStringGetLengthI( "knud" ) ) // gives 4 // e.g. // <F12> Message( FNStringGetLengthI( "the" ) ) // gives 3 RETURN( Length( s ) ) END // library: string: get: word: token: middle: return a given integer amount of characters from the a given startposition <description></description> <version control></version control> <version>1.0.0.0.2</version> (=MID$ in BASIC) <version>1.0.0.0.2</version> (filenamemacro=getstmid.s) [kn, ri, tu, 13-10-1998 20:29:00] STRING PROC FNStringGetMidStringS( STRING s, INTEGER beginI, INTEGER totalI ) // e.g. PROC Main() // e.g. STRING s[255] = FNStringGetInitializeNewStringS() // e.g. STRING positionbeginS[255] = FNStringGetInitializeNewStringS() // e.g. STRING charactertotalS[255] = FNStringGetInitializeNewStringS() // e.g. s = FNStringGetInputS( "string: get: MIDSTRING: string = ", "testing" ) // e.g. IF FNKeyCheckPressEscapeB( s ) RETURN() ENDIF // e.g. positionbeginS = FNStringGetInputS( "string: get: MIDSTRING: beginposition = ", "2" ) // e.g. IF FNKeyCheckPressEscapeB( positionbeginS ) RETURN() ENDIF // e.g. charactertotalS = FNStringGetInputS( "string: get: MIDSTRING: character total = ", "3" ) // e.g. IF FNKeyCheckPressEscapeB( charactertotalS ) RETURN() ENDIF // e.g. Message( FNStringGetMidStringS( s, FNStringGetToIntegerI( positionbeginS ), FNStringGetToIntegerI( charactertotalS ) ) ) // e.g. END // e.g. // e.g. <F12> Main() // // Message( FNStringGetMidStringS( "knud", 2, 3 ) ) // gives "nud" // Message( FNStringGetMidStringS( "knud", 3, 2 ) ) // gives "ud" // RETURN( SubStr( s, beginI, totalI ) ) // END
--- cut here: end ---------------------------------------------------- 5. -Input the first zip filename 1. -E.g. c:\temp\ddd1.zip 6. -Input the second zip filename 1. -E.g. c:\temp\ddd2.zip 7. -Input the first temporary directory name where you are going to unzip your zip file in 1. -E.g. C:\TEMP\DDD1\ 8. -Input the second temporary directory name where you are going to unzip your zip file in 1. -E.g. C:\TEMP\DDD2\ 9. -Run the program 10. -That will show the differences between any pair of same files in directory1 versus directory2 === Book: see also: === Diagram: see also: === File: see also: === File: version: control: see also: === Help: see also: === Image: see also: === Internet: see also: --- Computer: Editor: Text: TSE: Directory: File: Directory: All: Operation: Get: Walk: The: Tree: Link: Can you give an overview of links? http://goo.gl/Iv38p === Podcast: see also: === Record: see also: === Screencast: see also: === Table: see also: === Video: see also: === <version>1.0.0.0.3</version> ----------------------------------------------------------------------

Share |

This web page is created and maintained using the Semware TSE text editor