Pseudo-help function - can this be done?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Tim

Pseudo-help function - can this be done?

Post by Tim » Thu Dec 30, 2004 6:06 pm

I have a Windows application that can contain a product name as a selected item in a list box. I'd like send the user to a web page specific to the item when they hit some key, just like Windows help (the application isn't help-enabled.) So, if the item is "Widget C" they'll have a "Widget C Further Information" web page display that I built in advance for the item.

I'm new to Macro Scheduler, but I'm assuming it can read the value of a control. I'm somewhat stuck on how to look up the selected item and match it to a URL, although one option would be to create the web page with the item description as part of the URL.

Tim

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Thu Dec 30, 2004 6:26 pm

You *may* be able to use the "GetControlText" command to obtain the text.

GetControlText>WindowTitle,ClassName,Instance,Result

To find the ClassName, you can use the "Tools -> View system windows" tool from the main MSched window's drop down menus.

Example:

GetControlText>Title Bar Here*,ComboBoxEx32,1,strResult

' Then a *simple* (but there are better ways...) way of selecting a URL:
If>%strResult%=Widget C
Let>strURL=http://widgetc.us.com.net/
EndIf

If>%strResult%=Widget C More Information
Let>strURL=http://widgetc.us.com.net/info/
EndIf

' Then you can go to the target page
(See a recent post for a vbscript section to open MSIE at a target page)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts