51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 3218|回复: 5
打印 上一主题 下一主题

[原创] 我想使用sendkey方法调用ctrl+f的组合键

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2008-5-16 11:52:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如题,我应该怎么做啊?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2008-5-16 13:35:10 | 只看该作者
http://bbs.51testing.com/viewthr ... 53&statsdata=69||114921  可以参考一下这个帖子
回复 支持 反对

使用道具 举报

  • TA的每日心情
    开心
    2016-2-27 08:48
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    3#
    发表于 2008-5-16 14:52:59 | 只看该作者
    在 QTP 的帮助里面 搜索 sendkey,然后根据说明 自己写代码就可以了
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    开心
    2016-2-27 08:48
  • 签到天数: 2 天

    连续签到: 1 天

    [LV.1]测试小兵

    4#
    发表于 2008-5-16 14:53:32 | 只看该作者
    在论坛的 此版块,搜索 sendkey,肯定会得到一大把搜索结果。
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    5#
    发表于 2008-5-16 16:07:22 | 只看该作者
    帮助中写得非常完善,比绝大多数的帖子中的都要完善多了~~
    单个键的如下:
    Some keystrokes do not generate characters (such as ENTER and TAB). Some keystrokes represent actions (such as BACKSPACE and BREAK). To send these kinds of keystrokes, send the arguments shown in the following table:
    KeyArgument
    BACKSPACE{BACKSPACE}, {BS}, or {BKSP}
    BREAK{BREAK}
    CAPS LOCK{CAPSLOCK}
    DEL or DELETE{DELETE} or {DEL}
    DOWN ARROW{DOWN}
    END{END}
    ENTER{ENTER} or ~
    ESC{ESC}
    HELP{HELP}
    HOME{HOME}
    INS or INSERT{INSERT} or {INS}
    LEFT ARROW{LEFT}
    NUM LOCK{NUMLOCK}
    PAGE DOWN{PGDN}
    PAGE UP{PGUP}
    PRINT SCREEN{PRTSC}
    RIGHT ARROW{RIGHT}
    SCROLL LOCK{SCROLLLOCK}
    TAB{TAB}
    UP ARROW{UP}
    F1{F1}
    F2{F2}
    F3{F3}
    F4{F4}
    F5{F5}
    F6{F6}
    F7{F7}
    F8{F8}
    F9{F9}
    F10{F10}
    F11{F11}
    F12{F12}
    F13{F13}
    F14{F14}
    F15{F15}
    F16{F16}

    To send keyboard characters that are comprised of a regular keystroke in combination with a SHIFT, CTRL, or ALT, create a compound string argument that represents the keystroke combination. You do this by preceding the regular keystroke with one or more of the following special characters:
    KeySpecial Character
    SHIFT+
    CTRL^
    ALT%


    组合键就看这里
    Note   When used this way, these special characters are not enclosed within a set of braces.
    To specify that a combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, create a compound string argument with the modified keystrokes enclosed in parentheses. For example, to send the keystroke combination that specifies that the SHIFT key is held down while:
    • e and c are pressed, send the string argument "+(ec)".
    • e is pressed, followed by a lone c (with no SHIFT), send the string argument "+ec".
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
    发表于 2008-5-21 10:36:06 | 只看该作者

    回复 5# 的帖子

    谢谢
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-9-21 08:39 , Processed in 0.080422 second(s), 27 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表