Macro for creating blocks with a template and a word list

Macro for creating blocks with a template and a word list

2
NewbieNewbie
2

    Mar 01, 2009#1

    Hi

    2 text files (test_1.txt and test_2.txt)

    test_1.txt
    545
    224
    567
    744
    434
    ...
    about 100 lines

    test_2.txt
    bb*sd
    ds*iia
    ss*lfa
    fd*mm
    kl*uy
    ...
    about 500 lines

    The result after launching a macro

    bb545sd
    ds545iia
    ss545lfa
    fd545mm
    kl545uy
    ...
    bb224sd
    ds224iia
    ss224lfa
    fd224mm
    kl224uy
    ...
    bb567sd
    ds567iia
    ss567lfa
    fd567mm
    kl567uy
    ...
    bb744sd
    ds744iia
    ss744lfa
    fd744mm
    kl744uy
    ...
    bb434sd
    ds434iia
    ss434lfa
    fd434mm
    kl434uy
    ...

    How to write the macro?

    Thank you.

    6,603548
    Grand MasterGrand Master
    6,603548

      Mar 01, 2009#2

      Okay, here is the macro. It is important that only the 2 files are open and file test_2.txt has the focus when you start the macro.

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      Bottom
      IfColNumGt 1
      InsertLine
      IfColNumGt 1
      DeleteToStartofLine
      EndIf
      EndIf
      SelectAll
      Clipboard 9
      Copy
      CloseFile NoSave
      NewFile
      NextWindow
      Bottom
      IfColNumGt 1
      InsertLine
      IfColNumGt 1
      DeleteToStartofLine
      EndIf
      EndIf
      Top
      Clipboard 8
      Loop
      IfEof
      ExitLoop
      EndIf
      StartSelect
      Key END
      Copy
      EndSelect
      Key DOWN ARROW
      Key HOME
      IfColNumGt 1
      Key HOME
      EndIf
      PreviousWindow
      "InSeRtEdHeRe"
      Clipboard 9
      Paste
      GotoBookMark -1
      Find MatchCase Up "InSeRtEdHeRe"
      Replace ""
      Clipboard 8
      Find MatchCase "*"
      Replace All "^c"
      Bottom
      NextWindow
      EndLoop
      ClearClipboard
      Clipboard 9
      ClearClipboard
      Clipboard 0
      CloseFile NoSave
      Top
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Mar 03, 2009#3

        Thank you.