Community
    • Login

    Issue with macro

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 3 Posters 2.4k Views
    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 LiH
      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 FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        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 SherwoodP
          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
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors