Find and replace with cmd line params or multiple clipboards

Find and replace with cmd line params or multiple clipboards

1
NewbieNewbie
1

    Mar 03, 2006#1

    Hi,

    I was wondering if I can easily find and replace strings with a macro where the find and replace string is to be defined through parameters. I found the ^c option with find to get the string from the active clipboard but then I want to switch clipboard to replace the find string with the replace string.

    Example:

    FIND (text in clipboard 1)
    REPLACE ALL (text in clpboard 2)

    Thx.

    6,675585
    Grand MasterGrand Master
    6,675585

      Mar 03, 2006#2

      That's not possible. The replace is in real 1 command and not 2. So it's not possible to use clipboard 1 for the find and clipboard 2 for the replace part of the replace command. But there is a workaround for this problem with ^s - selected text.

      Top
      "Temporarily pasted text from clipboard 1 ends here!"
      Key HOME
      Clipboard 1
      Paste
      SelectToTop
      Clipboard 2
      Find "^s"
      Replace All "^c"
      Top
      StartSelect
      Find MatchCase Select "Temporarily pasted text from clipboard 1 ends here!"
      Delete
      EndSelect

      But if you only need this macro for replacing a text in a file run within a batch file, look at the free command line tools Xchang32.exe or Yank32.exe from Clay's Utilities for Win32, Version 1.0 Beta 6 which work fine and are very powerful.
      Best regards from an UC/UE/UES for Windows user from Austria