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

Re: Hold shift down while i do mouse actions

Expand Messages
  • Chris
    ... sure ... I m fairly new to GuiTest but I think SendRawKey will do what you want. The following script holds down shift while typing in Notepad: use
    Message 1 of 3 , May 18, 2007
      --- In perlguitest@yahoogroups.com, "Brandon" <truth_addict0@...>
      wrote:
      >
      > Anyone know how I can hold shift down while I click and drag the
      > mouse? I can do the click and drag part no problem, but i'm not
      sure
      > how to hold shift down while i'm doing this.
      >

      I'm fairly new to GuiTest but I think SendRawKey will do what you
      want.
      The following script holds down shift while typing in Notepad:

      use Win32::GuiTest qw/:ALL :VK/;

      system("start notepad.exe");
      sleep 1;

      SendRawKey(VK_SHIFT, 0);
      SendKeys "thing";
      SendRawKey(VK_SHIFT, KEYEVENTF_KEYUP);

      I'm sure someone else will come along and give you a better answer,
      but this seems to work for me.

      Cheers

      Chris
    Your message has been successfully submitted and would be delivered to recipients shortly.