Community
    • Login

    How can I tell the difference between Save and SaveAll

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    3 Posts 2 Posters 4.1k 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.
    • Jeff KellyJ Offline
      Jeff Kelly
      last edited by

      Hi
      I am using the notification NPPN_FILEBEFORESAVE but I can not tell if this is a Save Click or a Save All click.
      When I catch the event I can read the current file but when the event fires more than once for the Save All click the current file does not change.

      What I need to get is the full file path for each file as it is being saved with the Save All

      Thanks in advance

      Jeff

      1 Reply Last reply Reply Quote 0
      • dailD Offline
        dail
        last edited by

        (Depending on what language you are using this may vary a bit)

        The SCNotification struct has a Sci_NotifyHeader struct, which has an idFrom field. This is the BufferID. You can then use NPPM_GETFULLPATHFROMBUFFERID to get the path from that.

        The documentation doesn’t state the BufferID is carried in that notifaction, but looking at the sourcecode it looks like the NPPN_FILEBEFORESAVE notification does infact carry the BufferID.

        1 Reply Last reply Reply Quote 0
        • Jeff KellyJ Offline
          Jeff Kelly
          last edited by

          Excellent
          Thanks

          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