Jump to content
Macro Express Forums

Test for label selection.


Recommended Posts

Is there a feature/function in ME Pro that can test if a selection has been already made. I have created several very simple keypad macros that I execute when I select a numeric value attached to a specific label. This is the value on the right side of the optional labels (see either of the attached files). If I 'play' a macro by choosing a label number that is not already selected, the macro plays correctly. If I choose a label number where the label is already selected, the macro plays, but the results are wrong.

Thanks,

J.Stevens

Without select.JPG

With select.JPG

Link to comment
Share on other sites

Not that I know of. Not in the way you're hoping. 

 

I've not tried it but using the Variable Set Boolean command there is an option to set "If Control" and "Is focused". If the radio button several from the other buttons, that is a separate control, and it's focused when in this state, then one could detect this. 

Also there's a Get Control Text. There is no text in a radio button, but it might show up as zero and negative one indicating true or false. BTW the text "Carbon steel" is the label and I don't think MEP woudl return it. 

Also if you use the "Windows Controls" commands you might avoid the problem altogether. MEP Windows Control commands are always the first thing I try. I only resort to keystrokes and such if I can't do it with control commands. If you haven't learned them yet, you should. 

Hard to experiment with MEP control commands without having access to your program. 

If this is a web page or a UWP app control commands are useless.

 

You could also get the position of the control and Get Pixel Color relative to the control position to detect if it's blue or not white.

Link to comment
Share on other sites

Then ignore all I wrote about using controls. The WebBrowser is one big control. 

 

MEP is a great program but it's not well suited for some web page automation. You could do more with iMacros, but then it means learning a more difficult programming language. 

 

Sometimes tabbing though a page and using the spacebar can toggle these. 

Link to comment
Share on other sites

I've written Macro Express scripts that can select a certain radio button. They're clunky, but they can sometimes be made to work reliably. The approach I take is something like this:

 

1. Navigate to the radio button control by whatever means necessary. The messiest method that has worked reliably has to been to identify a "neutral" zone on the screen, usually (but not always) near the top-left corner of the window. Clicking in the neutral zone resets the tab order for the page. Then output a series of Tabs or Shift + Tabs to reach the set of radio buttons. (This method doesn't not work on all web pages.) Another method is to search for unique text on the page and cancel the search. That sometimes moves focus to the found text. Then Tab (or Shift + Tab) to the set of radio buttons.

 

2. Use the Up or Down arrow key to navigate to the radio button you want.

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