Macro to Find a value and store following text

Home Forums Multi-Edit User Created Macros Macro to Find a value and store following text

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #3007

    OK, guys real quick. Here is the sample text

    <roll where="house" session="112" year="2012" roll="17" source=""
    datetime="2012-02-01T18:59:00-05:00" updated="2014-06-18T11:20:32-04:00"
    aye="175" nay="247" nv="10" present="0">
    <type>On the Motion to Recommit</type>
    <question>On Motion to Recommit with Instructions: H R 1173 Fiscal Responsibility and Retirement Security Act</question>

    Is it possible to write a SHORT macro that looks for the equal sign and quotations marks (=") and then stores the text that is between the " " to a line in the file (or another file)

    Finds first ="
    Then gets the value "house" (without the quotation marks!) and stores it in a kine
    Finds next ="
    Stores "2012" in the same line

    I can always do a search and replace and replace where I find the where=" and replace it with nothing which will leave the values I want
    but if there is a function that comes close to what I was looking for, that would be great.

    Dont write any code….just let me know the functions I need to look at and I will take it from there….I hope !!!

    John Rushmeyer

    Clay Martin

    Hi John,
    Sorry for the delay. I suppose you posted just before the server when down, and we just got the forums restored on the new site.
    You can use SandR to find the text =” then read forward (mark block, forward_till, mark block and copy block) collecting the characters into a variable, you can open a second window with a blank file having you macro remember its win number and the original file’s also. Then Swichwin and write your values then switch back.

    In the CMac manula look for text maniputation, block comments and window function list.

    Hope this helps,

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.