Jump to content
Macro Express Forums

How To Capture Status Bar Info?


Markter
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

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...