Chinaunix首页 | 论坛 | 博客
  • 博客访问: 499715
  • 博文数量: 105
  • 博客积分: 2922
  • 博客等级: 少校
  • 技术积分: 1113
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-02 16:30
文章分类

全部博文(105)

文章存档

2018年(1)

2016年(2)

2015年(3)

2014年(6)

2013年(21)

2012年(10)

2011年(8)

2010年(7)

2009年(31)

2008年(16)

我的朋友

分类:

2009-10-13 15:11:07

1 Send()
窗口句柄(handle(parent))
---------------------------------------------------------------
Send(Handle(window),256,9,0)
---------------------------------------------------------------
16进制 用时转换为10进制
  vk_LButton   = $01;   vk_RButton   = $02;  vk_Cancel    = $03;
  vk_MButton   = $04;  vk_Back      = $08;
  vk_Tab       = $09;  vk_Clear     = $0C;  vk_Return    = $0D;
  vk_Shift     = $10;  vk_Control   = $11;  vk_Menu      = $12;
  vk_Pause     = $13;  vk_Capital   = $14;  vk_Escape    = $1B;
  vk_Space     = $20;  vk_Prior     = $21;  vk_Next      = $22;
  vk_End       = $23;  vk_Home      = $24;  vk_Left      = $25;
  vk_Up        = $26;  vk_Right     = $27;  vk_Down      = $28;
  vk_Select    = $29;  vk_Print     = $2A;  vk_Execute   = $2B;
  vk_SnapShot  = $2C;
  vk_Insert    = $2D;  vk_Delete    = $2E;  vk_Help      = $2F;
  vk_NumPad0   = $60;  vk_NumPad1   = $61;  vk_NumPad2   = $62;
  vk_NumPad3   = $63;  vk_NumPad4   = $64;  vk_NumPad5   = $65;
  vk_NumPad6   = $66;  vk_NumPad7   = $67;  vk_NumPad8   = $68;
  vk_NumPad9   = $69;  vk_Multiply  = $6A;  vk_Add       = $6B;
  vk_Separator = $6C;  vk_Subtract  = $6D;  vk_Decimal   = $6E;
  vk_Divide    = $6F;  vk_F1        = $70;  vk_F2        = $71;
  vk_F3        = $72;  vk_F4        = $73;  vk_F5        = $74;
  vk_F6        = $75;  vk_F7        = $76;  vk_F8        = $77;
  vk_F9        = $78;  vk_F10       = $79;  vk_F11       = $7A;
  vk_F12       = $7B;  vk_F13       = $7C;  vk_F14       = $7D;
  vk_F15       = $7E;  vk_F16       = $7F;  vk_F17       = $80;
  vk_F18       = $81;  vk_F19       = $82;  vk_F20       = $83;
  vk_F21       = $84;  vk_F22       = $85;  vk_F23       = $86;
  vk_F24       = $87;  vk_NumLock   = $90;  vk_Scroll    = $91;
---------------------------------------------------------------
Send(Handle(this),256,9,0)
---------------------------------------------------------------
Send(Handle(getfocus()),256,9,0) 
 
2:api
Subroutine keybd_event(int bVk,int bScan,ulong dwFlags,ulong dwExtraInfo) LIBRARY "user32.dll"

Choose Case Lower(as_val)

Case   'pageup'
keybd_event(33,0,0,0)
keybd_event(33,0,2,0)
Case   'pagedown'
keybd_event(34,0,0,0)
keybd_event(34,0,2,0)
 

Case 'end'
keybd_event(35,0,0,0)
keybd_event(35,0,2,0)
Case 'home'
keybd_event(36,0,0,0)
keybd_event(36,0,2,0)
Case '↑'
keybd_event(38,0,0,0)
keybd_event(38,0,2,0)
Case '↓'
keybd_event(40,0,0,0)
keybd_event(40,0,2,0)
Case '←'
keybd_event(37,0,0,0)
keybd_event(37,0,2,0)
Case '→'
keybd_event(39,0,0,0)
keybd_event(39,0,2,0)
Case 'enter'
keybd_event(13,0,0,0)
keybd_event(13,0,2,0)
Case 'tab'
keybd_event(9,0,0,0)
keybd_event(9,0,2,0)
End Choose
 
阅读(1016) | 评论(0) | 转发(0) |
0

上一篇:行列互转

下一篇:PB资源分享

给主人留下些什么吧!~~