1 Reply Latest reply on Dec 18, 2009 8:34 AM by philmodjunk

    How to capture when user clicks "Cancel" on the status bar during a find

    Will

      Title

      How to capture when user clicks "Cancel" on the status bar during a find

      Post

      I have a OnModeExit script that runs after the user selects the Find option on the status bar (or is it called menu bar... whatever). It's important that I capture if the user clicks on the Perform Find or Cancel Find button. I've tested Get(LastError) and Get(LastMessageChoice) and several other Gets to try to determine what they click and that doesn't work. I use custom menus throughout the program but can't seem to find a way to create a custom menu for when the user goes into find mode.

       

      I know there is a way to do this but I'm just not seeing it clearly. What is the solution here?

       

      Thanks,
      WB

        • 1. Re: How to capture when user clicks "Cancel" on the status bar during a find
          philmodjunk
            

          Write a script with this general format:

           

          If [ Get ( WindowMode ) = 1 /* user is in Find mode */]

             #User as clicked "cancel" or used view menu to enter browse mode from find

             # do the stuff you want to do if the user clicks cancel here

          Else

             enter Browse Mode

          End If

           

          In Manage Custom Menus, Set up a custom menu set and edit a copy of the View menu to perform the above script when "Browse Mode" is selected. Now assign this custom menu set to any layout where you need this functionality.