Community
    • Login

    Issue with macro

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 3 Posters 2.8k Views 2 Watching
    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 Offline
      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 Offline
        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 Offline
          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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors