<commit_before>#Copyright (c) 2010, <NAME>. All rights reserved.

module Bewildr
  module ControlTypeAdditions
    module MenuItemAdditions
      def self.extended(base)
        base.instance_eval do
          def sub_menus
            get(:type => :menu_item, :scope => :children, :how_many => :all)
          end
        end
      end
    end
  end
end
<commit_msg>adding a click override method - uses invoke instead of normal click<commit_after>#Copyright (c) 2010, <NAME>. All rights reserved.

module Bewildr
  module ControlTypeAdditions
    module MenuItemAdditions
      def self.extended(base)
        base.instance_eval do
          def sub_menus
            get(:type => :menu_item, :scope => :children, :how_many => :all)
          end

          #menu items like 'invoke', not a proper mouse click
          def click
            @automation_element.get_current_pattern(System::Windows::Automation::InvokePattern.pattern).invoke
          end
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.07806324110671936, 'fraction_numerical': 0.007905138339920948, 'mean_word_length': 2.27831715210356, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1214720', 'n_tokens_mistral': 301, 'n_tokens_neox': 281, 'n_words': 85}