Community
    • Login

    Is it possible to record macro to enter current date?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    7 Posts 4 Posters 2.0k Views 1 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.
    • JasonCh11J Offline
      JasonCh11
      last edited by

      Hi,

      I have a macro for search and replace. Is it possible to edit the macro to enter current date without plugins?

      Cheers

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @JasonCh11
        last edited by Alan Kilborn

        @JasonCh11

        Yes.
        Suggest you see the user manual section on hand-editing configuration files, HERE.
        Or…re-record your base macro and put the insert-date command in the sequence where you need it.

        JasonCh11J 1 Reply Last reply Reply Quote 1
        • JasonCh11J Offline
          JasonCh11 @Alan Kilborn
          last edited by

          @Alan-Kilborn I did read the manual but there’s no variable for date.

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA Offline
            Alan Kilborn @JasonCh11
            last edited by

            @JasonCh11 said in Is it possible to record macro to enter current date?:

            there’s no variable for date

            Not exactly sure what this means…

            Record and save a throwaway macro for inserting a date/time (on the Edit (menu) > Insert submenu.

            Then look at the macro that N++ creates, possibly merge that text manually into a larger macro you already have existing, delete the throwaway, etc…

            1 Reply Last reply Reply Quote 1
            • Rufus SmithR Offline
              Rufus Smith
              last edited by

              Why “without plugins”?
              I use the Python Script plugin with which you can do amazing things in python. And yes, I have created a timestamp button which inserts the current date and time at the cursor position using it. I don’t understand why you want to do it without plugins.

              1 Reply Last reply Reply Quote 0
              • guy038G Offline
                guy038
                last edited by guy038

                Hello, @jasonch11, @alan-kilborn, @peterjones and All

                @jasonch11, as @alan-kilborn advice you, you can use the 3 N++ native options :

                • Edit > Insert > Date Time (short)

                • Edit > Insert > Date Time (long)

                • Edit > Insert > Date Time (customized)

                If you choose the third option, you can customize the date format in Settings > Preferences... > Multi-Instance & Date !

                Of course, with the Shortcut Mapper, you may assign any available shortcut to these 3 options

                OK with N++ 8.4.4 :

                Notepad++ v8.4.4   (64-bit)
                Build time : Jul 15 2022 - 17:54:42
                Path : E:\844_x64\notepad++.exe
                Command Line : 
                Admin mode : OFF
                Local Conf mode : ON
                Cloud Config : OFF
                OS Name : Windows 10 Pro (64-bit) 
                OS Version : 21H2
                OS Build : 19044.1949
                Current ANSI codepage : 1252
                Plugins : 
                    mimeTools (2.8)
                    NppConverter (4.4)
                    NppExport (0.4)
                    ComparePlus (1)
                

                Best Regards,

                guy038

                P.S. :

                Oh, @jasonch11, I misunderstood your goal ! So, follow the @alan-kilborn advice and merge the date insertion parameters, somewhere in your macro containing the S/R process !

                Rufus SmithR 1 Reply Last reply Reply Quote 1
                • Rufus SmithR Offline
                  Rufus Smith @guy038
                  last edited by

                  @guy038 You reminded me why I didn’t need my python plugin recently! I have been using that edit/insert/date and forgot about it! A lot of cool plugins are now incorporated in notepad, like sort/compare/etc…

                  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