Look in another file and apply a change in the current

Look in another file and apply a change in the current

2

    Mar 24, 2005#1

    I am going through my current file and for each word I am looking in another file to see if that word is in there, if it is I want to be able to change my current word to something different. I have it set up to the point where I can look in the other file, but I have no way of returning wether it found something or not. If there anyway to get a return type from FindInFiles or be able to search the output window or anything like that?

    Here's an example of my code:

    InsertMode
    ColumnModeOff
    HexOff
    UnixReOn
    Loop
    IfEof
    ExitLoop
    EndIf
    StartSelect
    SelectWord
    Copy
    FindInFiles MatchWord OutputWin "Dir" "File" "^c"
    ** I need that function to return true or false **
    IfFound
    ToUpper
    EndIf
    EndSelect
    Key RIGHT ARROW
    Key RIGHT ARROW
    EndLoop

    6,687587
    Grand MasterGrand Master
    6,687587

      Mar 24, 2005#2

      Open also the other file before running the macro.

      Replace

      FindInFiles MatchWord OutputWin "Dir" "File" "^c"
      ** I need that function to return true or false **
      IfFound
      ToUpper
      EndIf

      with

      NextWindow
      Top
      Find MatchWord "^c"
      IfFound
      PreviousWindow
      ToUpper
      Else
      PreviousWindow
      EndIf

      in your macro.
      Best regards from an UC/UE/UES for Windows user from Austria

      2

        Mar 24, 2005#3

        Thanks a million... That worked perfectly!