Jump to content
Macro Express Forums

Erratic tabbing when completing form


Recommended Posts

A macro that used to work fine for a year or more has started failing in an odd fashion. It's a very simple macro I use for entering the ME Pro Bug Report Form at http://www.macros.com/bugreport.htm

As it might be handy for others I'll include it in its entirety here anyway.

 

// ME Pro Bug Report

Keystroke Speed: 5 milliseconds

Web Site, "http://www.macros.com/bugreport.htm", using Default Web Browser

Macro Run: Wait for FF web page ready

Window Reposition: - Mozilla Firefox Position: 0, 0

Text Type (Simulate Keystrokes): <CONTROL><HOME>

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): <TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB><TAB> // Tab to First Name. (Was 15 tabs, now seems to only need 14)

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): Terry // Type First Name

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): <TAB>Pinnell // Surname

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): <TAB>terrypin@dial.pipex.com // email

Delay: 100 milliseconds

Text Type (Simulate Keystrokes):

<TAB><TAB><ARROW DOWN> // Product

Delay: 100 milliseconds

Text Type (Simulate Keystrokes):

<TAB>4.1.7.1 // Version

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): <TAB><TAB><ARROW DOWN> // Operating System

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): <TAB><ARROW DOWN> // Incorrect Functionality

Delay: 100 milliseconds

Text Type (Simulate Keystrokes): <TAB><ARROW DOWN> // Problem Frequency

Delay: 100 milliseconds

 

As you see, it just opens Firefox at that page then tabs through each required filed , completing it with Text Type commands, with generous delays between each.

 

But now it behaves erratically. Instead of stopping after entering the Problem Frequency ('Can Reproduce') it acts as if the Send Report button has been clicked prematurely, and displays this:

 

MEProBugReportForm-1.jpg

 

 

And it gives inconsistent results depending on the value of the Keystroke Speed command. Oddly, it gets worse the higher that value is. At 50 ms, for example, it gets half way through the Version field, typing '4.1' instead of '4.1.7.1' and then changes to an unrelated Firefox tab! The best result is with that Keystroke Speed command disabled. I'd have assumed slowing it down would make it more reliable, not the opposite?

 

If I insert a Macro Stop after the Email entry, it stops as it should. But if I move that Stop down to after the Product entry, the premature error page is displayed, as if the macro has suddenly tabbed down several extra times.

 

It's presumably some sort of timing or race issue, but why now after a year or two of stable usage? Anyone else seeing similar tabbing issues please?

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

It's presumably some sort of timing or race issue, ...

Terry, there's no need to make this a race issue.

Ha--I'm funny--yes?

 

Seriously though, I wonder if putting some "Wait for text type" delays would help?? Maybe Windows is getting tab-happy??

 

Extra funny: A macro for doing bug reports, that has a bug... That's like a zen riddle -eh?

Link to comment
Share on other sites

Terry, there's no need to make this a race issue.

Ha--I'm funny--yes?

 

Seriously though, I wonder if putting some "Wait for text type" delays would help?? Maybe Windows is getting tab-happy??

 

Extra funny: A macro for doing bug reports, that has a bug... That's like a zen riddle -eh?

 

Thanks Steve. Yep, I missed that non-deliberate pun!

 

I may well try some "Wait for text type" delays, but I'm still hung up about why it should have started this only recently. I may install an older version and see if that still exhibits it.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

It sounds like a problem caused by JavaScript or Ajax or some other scripting that happened in the background. I faced similar problems while automating my Hotmail login.

 

The solution that worked for me was to dramatically increase the time delays between steps, up to 2500 ms.

 

You might also try sending the keystrokes via the clipboard.

 

My guess is that you could eliminate many of the delays in the script without compromising reliability. But experiment with adding very long delays at the point where the script fails.

Link to comment
Share on other sites

Thanks Alan. But after trying all those suggestions and several other ideas the macro's behaviour continued to baffle me.

 

Small wonder. After at least another hour I finally discovered it was my stupid error! :wacko:

 

At the start of one of my Text Type commands I'd entered a blank line. I must have pressed Enter to close the dialog instead of clicking OK.

 

--

Terry, East Grinstead, UK

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...