zoukankan      html  css  js  c++  java
  • Ruby: Print WIN32OLE method names in Ruby

    class WIN32OLE
      def list_ole_methods
        method_names = ole_methods.collect {|m| m.name}
        puts method_names.sort.uniq
      end
    end
    WIN32OLE.new('Shell.Application').list_ole_methods
     
    得到如下方法:
    AddRef
    AddToRecent
    Application
    BrowseForFolder
    CanStartStopService
    CascadeWindows
    ControlPanelItem
    EjectPC
    Explore
    ExplorerPolicy
    FileRun
    FindComputer
    FindFiles
    FindPrinter
    GetIDsOfNames
    GetSetting
    GetSystemInformation
    GetTypeInfo
    GetTypeInfoCount
    Help
    Invoke
    IsRestricted
    IsServiceRunning
    MinimizeAll
    NameSpace
    Open
    Parent
    QueryInterface
    RefreshMenu
    Release
    ServiceStart
    ServiceStop
    SetTime
    ShellExecute
    ShowBrowserBar
    ShutdownWindows
    Suspend
    TileHorizontally
    TileVertically
    ToggleDesktop
    TrayProperties
    UndoMinimizeALL
    WindowSwitcher
    Windows
    WindowsSecurity
  • 相关阅读:
    C++ 中的深入浅拷贝和深拷贝
    C++ 引用小问题
    6-10
    6-8
    6-7
    6-4
    6-3
    6-1
    5-31
    COMException 依赖服务或组无法启动(0x8007042C)处理办法
  • 原文地址:https://www.cnblogs.com/autotest/p/3262473.html
Copyright © 2011-2022 走看看