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
  • 相关阅读:
    LINUX和git
    drf [Django REST Framework]
    python用法小技巧
    爬虫
    django入门到精通
    前端框架
    mysql数据库
    网络编程和并发编程
    面向对象
    python基础
  • 原文地址:https://www.cnblogs.com/autotest/p/3262473.html
Copyright © 2011-2022 走看看