zoukankan      html  css  js  c++  java
  • Ruby: 获取IE的一些信息(其实应用AutoIt脚本本身,获取这些信息更加简单)

    require'win32/registry'

    hkey_local_machine=Win32::Registry::HKEY_LOCAL_MACHINE

    defgetKeyValue(hive, key_path, key_name)

                  reg_obj=hive.open(key_path, Win32::Registry::KEY_READ)

                  begin

                          reg_typ, reg_val = reg_obj.read(key_name)

                  rescue Win32::Registry::Error

                          puts "key not found : #{key_name}"

                  end

                  return reg_val

    end

    defGetIEBrowserVersion()

                  hkey_local_machine=Win32::Registry::HKEY_LOCAL_MACHINE

                  return getKeyValue(hkey_local_machine, "SOFTWARE\Microsoft\InternetExplorer", "Version")

                end

     

    k=GetIEBrowserVersion()

    puts 'IE version:'+k

  • 相关阅读:
    Qt全局坐标和相对坐标
    坐标系统
    qt坐标系统见解
    Qt中QGraphics类坐标映射关系详解
    对QT多线程以及事件投递的理解
    Qt中mouseMoveEvent无效
    递归、尾递归
    末日重生
    201314
    归并排序
  • 原文地址:https://www.cnblogs.com/autotest/p/3262445.html
Copyright © 2011-2022 走看看