Go to first tabable item in window

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
Pro Scripter
Posts: 83
Joined: Sun Oct 08, 2017 11:57 pm

Go to first tabable item in window

Post by Warren » Sat Oct 21, 2017 10:15 pm

While I see how in both Windows and Chrome to tab forward or backward through elements on a page, what I don't see anywhere is how to reset to a fixed point of reference (like the first item on the page that can be tabbed) in case I've already interacted with the page, and am not sure which item it's currently focussed?

Also, don't really want to query the current focussed item and move forward or back through the list as the number of tabbable elements may change over time, so if I'm looking for the first few, i really just want to start over as if the page has not been visited.

Basically, how do I say "Tab to the second tabbable element on the page regardless of which element is currently focussed?

User avatar
Marcus Tettmar
Site Admin
Posts: 7063
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK

Re: Go to first tabable item in window

Post by Marcus Tettmar » Sun Oct 22, 2017 9:01 am

I guess you're either going to have to keep score of how many times you've tabbed so you know where you are, or .. just restart the app / close the window / go back - so that it's at a known starting point.

I've worked on scripts where if something goes wrong we kill the app, restart it, navigate to the starting point and then restart at the next record. Sometimes that's the only way to be 100% sure we're at the right starting point.

Sometimes we don't have to be so severe. Some apps we can just close that window and then come back in and we'll be back at the first field. E.g. we might be adding new records, when doing so a new window appears, putting as at the first field. Cancelling it will close the window. Hitting new record again puts us again at the first field. So as always - it depends on the app.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply