Loading ...
Sorry, an error occurred while loading the content.

How about Press Ctrl key before next operate?

Expand Messages
  • liu xiaolei
    hi, How about Press Ctrl key? I write a function ,please look this: # 1 start x,2 start y,3 end x,4 end y sub CtrlClickTwo { MouseMoveAbsPix($_[0],$_[1]);
    Message 1 of 2 , Mar 23, 2005
    • 0 Attachment
      hi,
      How about Press Ctrl key?
      I write a function ,please look this:

      # 1 start x,2 start y,3 end x,4 end y
      sub CtrlClickTwo
      {
      MouseMoveAbsPix($_[0],$_[1]);
      SendMouse("{LEFTCLICK}");
      sleep 1;
      SendRawKey(VK_CONTROL,0);
      sleep 1;
      MouseMoveAbsPix($_[2],$_[3]);
      SendMouse("{LEFTCLICK}");
      sleep 1;
      SendRawKey(VK_CONTROL,KEYEVENTF_KEYUP);
      }
      But when i use it,Ctrl key cann't press down.
      Why ?

      Thanks,
      Liu xiaolei

      _________________________________________________________
      Do You Yahoo!?
      150万曲MP3疯狂搜,带您闯入音乐殿堂
      http://music.yisou.com/
      美女明星应有尽有,搜遍美图、艳图和酷图
      http://image.yisou.com
      1G就是1000兆,雅虎电邮自助扩容!
      http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
    • Dennis K. Paulsen
      You can try: SendRawKey(VK_LCONTROL, KEYEVENTF_EXTENDEDKEY); # press SendRawKey(VK_LCONTROL, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP); # release Regards,
      Message 2 of 2 , Apr 29, 2005
      • 0 Attachment
        You can try:

        SendRawKey(VK_LCONTROL, KEYEVENTF_EXTENDEDKEY); # press
        SendRawKey(VK_LCONTROL, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP); #
        release

        Regards,
        Dennis

        --- In perlguitest@yahoogroups.com, liu xiaolei <guguqiaqia@y...>
        wrote:
        >
        > hi,
        > How about Press Ctrl key?
        > I write a function ,please look this:
        >
        > # 1 start x,2 start y,3 end x,4 end y
        > sub CtrlClickTwo
        > {
        > MouseMoveAbsPix($_[0],$_[1]);
        > SendMouse("{LEFTCLICK}");
        > sleep 1;
        > SendRawKey(VK_CONTROL,0);
        > sleep 1;
        > MouseMoveAbsPix($_[2],$_[3]);
        > SendMouse("{LEFTCLICK}");
        > sleep 1;
        > SendRawKey(VK_CONTROL,KEYEVENTF_KEYUP);
        > }
        > But when i use it,Ctrl key cann't press down.
        > Why ?
        >
        > Thanks,
        > Liu xiaolei
        >
        > _________________________________________________________
        > Do You Yahoo!?
        > 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
        > http://music.yisou.com/
        > ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ
        > http://image.yisou.com
        > 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
        >
        http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event
        /mail_1g/
      Your message has been successfully submitted and would be delivered to recipients shortly.