Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Issue with macro

    General Discussion
    3
    3
    2155
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Hongyan Li
      Hongyan Li last edited by

      I have this JSON text that contains a string attribute which is another escaped JSON in quotes. I wanted to extract that text and un-escape the JSON. So I tried it with the following steps to record a macro:

      1. Start the recording
      2. Bookmark the line that contains the JSON to un-escape
      3. Remove the unmarked lines
      4. Use Regex with group to find text and crop (Find/replace) the retain the escaped JSON
      5. un-escape the JSON
      6. Stop the recording

      Manually doing all the above steps, gave me the expected JSON un-escaped. but when I replay the recording, it gave me only one single “{”. Is this a bug in the existing Notepad++? I tried this with many ealier releases and the latest v6.8.8.

      Thanks.

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @Hongyan Li last edited by

        Hello @Hongyan-Li,

        I assume it depends on how you did it.
        From my experience it is better to use as much keystrokes as possible instead
        of using the mouse and click. For example it you clicked the bookmark margin
        it doesn’t get recorded but when using CTRL+F2 to bookmark it gets recorded.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Phil Sherwood
          Phil Sherwood last edited by

          Check if you have auto insert of closing parenthesis, etc. I found an issue where they don’t insert during record, but do during playback. (Settings->Preferences->Auto Completion, look on the lower right panel)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors