No internet connection
  1. Home
  2. How to

Delete all memory locations

By Dav3 @D_av_3
    2021-03-22 14:00:29.160Z

    Hello everybody.
    I would need to create a script to delete all memory locations. But I can not. would you have any suggestions?

    Solved in post #3, click to view
    • 7 replies
    1. Hey Davide!

      This bit of code will take care of that:

      function deleteAllMemoryLocations() {
          sf.ui.proTools.memoryLocationsWindow.popupButtons.whoseTitle.is("Memory Locations").first.popupMenuSelect({
              menuPath: ['Delete All']
          });
      }
      
      function main() {
          sf.ui.proTools.appActivateMainWindow();
      
          sf.ui.proTools.memoryLocationsEnsureWindow({
              action: deleteAllMemoryLocations,
              restoreWindowOpenState: true
          });
      }
      
      main();
      
      1. Do you know if this script could be modified to delete only markers thats name starts with "location "? so i can remove Location 27, location 68 etc in one go. ideally without it even needing to open the memory window. thanks

        1. However it does have to go 1 by 1

          1. @Luke_Dunn_Gielmuda, Owen's suggestion is the way to go.

            Currently, we're still limited with working with the memory locations window and deleting them each at a time.

            1. Works Great. thank you.

        2. In reply toD_av_3:
          Dav3 @D_av_3
            2021-03-22 22:45:29.170Z

            Thank You Raphael!!

            Reply1 LikeSolution
            1. In reply toD_av_3:
              Dav3 @D_av_3
                2021-03-22 23:07:47.925Z

                Super Raphael !!! Simply perfect