Billy.Quick Posted October 10, 2012 Report Share Posted October 10, 2012 I'm scaling up a small operation and a chronic error is now unacceptable. When IE loads, usually the cursor is in the same position within the particular page, and from that point you can make it go where you want using "tab" and "shift + tab". However, about 20% of the time, the IE Page loads with the cursor "somewhere else", and that screws the whole macro up. It's been like this for at least a year, but now I have to deal with it and fix it. What I want to do is find a way to get the cursor to a "home" position immediately after the IE page loads, so that it is always starting from a known and predictable position. But I can't get the keyboard to control the cursor in any other way than those I've mentioned. "home" doesn't work, etc... And the mouse is a bad option because screen position changes from monitor to monitor. Any help? Quote Link to comment Share on other sites More sharing options...
paul Posted October 10, 2012 Report Share Posted October 10, 2012 Alt-D will select the address bar, from which you can then tab or shift-tab to your heart's content! Quote Link to comment Share on other sites More sharing options...
Billy.Quick Posted October 10, 2012 Author Report Share Posted October 10, 2012 Woot ! It CAN'T be that simple. Lemme go try. Quote Link to comment Share on other sites More sharing options...
Billy.Quick Posted October 10, 2012 Author Report Share Posted October 10, 2012 Alt-D will select the address bar, from which you can then tab or shift-tab to your heart's content! Thanks Paul. That really solved everything. Not only do I have a static and controllable starting point, but I can get to where I'm going within the page with fewer keystrokes (less to go wrong). A solid WIN all the way around. Great answer, and thanks a lot. Quote Link to comment Share on other sites More sharing options...
acantor Posted October 10, 2012 Report Share Posted October 10, 2012 A few caveats about the Alt + D approach... 1. The technique is only really reliable on a newly loaded page. On a page that you have already navigated on, pressing Alt + D will move the cursor to the address line, but when you tab, focus could end up on the most recently visited link instead of the first link. (This behavior may be browser specific). 2. The hotkey may fail on pages that contain non-W3C technologies such as Flash and PDF. (JavaScript and Ajax can also throw things for a loop.) 3. The number of times that you must tab after pressing Alt + D to reach the first link is a function of how the browser is configured. For example, if you have toolbars between the address line and the active window, you may have to press the tab key several times to navigate through the toolbars. Add-ins, configuration settings, etc. can also affect the number of tabs. 4. Under ideal conditions, there is no need to insert a delay between the tabs. But on some pages, tab-key navigation is unpredictable without a short delay between each simulated keypress. I have noticed this most often on pages that are heavy with JavaScript. Quote Link to comment Share on other sites More sharing options...
paul Posted October 10, 2012 Report Share Posted October 10, 2012 That's a fantastic mine of information - if only we could pin this text! Thanks Alan, I didn't know any of this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.