Markter Posted January 31, 2005 Report Share Posted January 31, 2005 Good day, My macro tabs thru a web page and I need to capture the status bar info, but I am having trouble. This seems basic enough. What am I doing wrong? Here is what i have: Get Control %C1% (ePACES - Microsoft Internet Explorer: msctls_statusbar32) Variable Get Control Text: %C1% to %T1% If Variable %T1% contains "doPostBack" Text Type: <TAB> End If I keep getting an error that says- Can not get the control. Thanks! -Mark Quote Link to comment Share on other sites More sharing options...
kevin Posted February 1, 2005 Report Share Posted February 1, 2005 In testing this, I noticed that the Control variable contains the title of the window. If I click on the 'Display Control Info' button in the Get Control dialog, it says: Insight Software Solutions - All Products - Microsoft Internet Explorer - [iEFrame] msctls_statusbar32 - [index: 22] The "Insight Software Solutions - All Products - Microsoft Internet Explorer" part is from the Window Title. This means that you need a different control for each page. There are three techniques to accomplish this. 1. Use a separate 'Get Control' command for each web page. 2. Use a single Window Control but alter it as the macro runs using the 'Variable Set Control Text' command. Something like this might work: Variable Set String %T3% from Window Title Variable Set Control Text %C1% to "%T3% - [IEFrame]" Some experimentation may be necessary. 3. If you know the position of a Window Control you can use the 'Capture Control' command. This command is designed to set a control variable as a macro runs instead of when you are writing the macro. You can calculate the position of the status bar on a window using the 'Variable Set Integer from Top of Window', 'Variable Set Integer from Left of Window', 'Variable Set Integer from Width of Window', and 'Variable Set Integer from Height of Window' commands. If I were writing this macro, I would lean toward technique #3. Quote Link to comment Share on other sites More sharing options...
Markter Posted February 1, 2005 Author Report Share Posted February 1, 2005 Technique #3 seems to work fine. Thanks Kevin. -Mark 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.