WinAutomation - windows automation software with macro recorder

      Send Multiple Repetitive Keystrokes with Send Keys

      When automating form submissions with WinAutomation, it is usually needed to send the same keystroke multiple times. A typical example is the {Tab} keystroke which is used to change the input field that we are currently editing. For example, in the form that is shown below:


      you will have to send 11 Tab keystrokes in order to modify the "Distance from ground".

      Even though you can do this by copying and pasting {Tab} in the "Text to Send" input field of the "Send Keys" action, it is not the recommended solution for 2 main reasons:

      1) If you have a rather large job, with many "Send Keys" actions, it becomes very hard to keep track of what the job is doing when you see a lot of {Tab} or {Enter} next to each other.
      2) In some other cases you may need to send 200 {Down} keystrokes. Would you have the patience to copy and paste it 200 times?

      Now, that I think about it, there is another reason: there is a better way to do it!

      WinAutomation allows you to send multiple repetitive keystrokes by using the notation {X:n}, where X is the name of the keystroke and n is the number or repetitions. For example, if you want to send 40 {Tab} keystrokes, you can just write: {Tab:40}, or if you want to send 450 down arrow keys, you can use the notation: {Down:450}!

      Your rating: None Average: 3 (2 votes)

      Comments:
      #1 by Thomas Minitsios - Mon, 01/18/2010 - 14:52

       Are you sure that you have the latest release of WinAutomation installed in your machine? This is a feature that has been added in WinAutomation v3.0.1, so please make sure that you have the latest release installed (v3.0.3)



      #2 by Jorge (not verified) - Mon, 01/18/2010 - 14:39

      Hello Thomas,

      Thank you for this interesting post. It is very helpful to send multiple repetitive keystrokes with send keys.

      On the other hand, I have try with {Tab:3}for exemple, in a active window. But the result has been to write {Tab:3} into the active form instead the effect to jump 3 times.

      So I have used the "move mouse" option, but it only works sometimes.

      Please, how can I change from one to other form to fill?

      Best regards,

      Jorge



      Post new comment

      The content of this field is kept private and will not be shown publicly.
      • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
      • Lines and paragraphs break automatically.
      • Web page addresses and e-mail addresses turn into links automatically.
      • You may quote other posts using [quote] tags.

      CAPTCHA
      This question is for testing whether you are a human visitor and to prevent automated spam submissions.
      Image CAPTCHA
      Enter the characters shown in the image.



      Featured Clients