Jump to content
Macro Express Forums

List Box and ME's Control Activation


patgenn123

Recommended Posts

I have a task list in a database that I ask ME to "focus" and to give me the information on an individual line that can COPY to the clipboard via Text Type (CTRL +C) in Macro Express. I use the Activation Screen with "GET CONTROL" with " CONTROL ON TOP".

 

In other words, when I click on an individual line in the list box, ME is supposed to be "TRIGGERED/ACTIVATED" to copy that line to the clipboard using ME's TEXT TYPE to copy it.

 

The problem is (and it's a big problem) is that it mostly works, but at times when I go to another program and then come back to this database, CLICK on any random item on the list control, it does not copy it right away. It has to be clicked two, sometime 3 times to get it to copy.

 

What in tarnations is going on? Why doesn't ME copy this to the clipboard? This is another list in terrible programming by ME when it comes to control focus etc.

 

Would someone be able to explain this problem? When I am clicking on the listbox, it should activate the control which in turn should copy the line no matter what. Why do I have to click it two, three times to get it to "WAKE UP" to copy the line again. Is it sleeping?

 

-P

Link to comment
Share on other sites

Is is possible the copy-to-clipboard is just taking an excessive amount of time? I have seen great variability in how long it takes for a CTRL-c to finish. 250 ms is not enough.

 

You could try putting a LONG delay, say 3 or 5 seconds, after the copy -- just for validation purposes. If that makes it 100 per cent reliable, then you know the macro is in fact working, and we can work on the timing to get the delay down to something reasonable.

Link to comment
Share on other sites

Here is how i do it:

 

<TVAR2:01:01:><REP3:08:000002:000001:0001:0:01:><TEXTTYPE:<CONTROL>c><TDELAY:.25><TVAR2:01:03:><ENDREP>

 

Variable Set String %T1% ""

Repeat Until %T1% <> ""

Text Type <CONTROL>c

Wait Time Delay 0.25 Seconds

Vairable Set String %T1% from Clipboard

Repeat End

 

Seems to work and you don't have to waste any more time than needed.

Link to comment
Share on other sites

I give up. This seems to be going all over the place. Here is what I have:

 

<DELAY:1><TEXTTYPE:<CTRLD>c<CTRLU>>

 

Keep in mind this is triggered using an ACTIVATION trigger control.

 

I tried something different. Now when I go to a different window title/program and then come back to the program I desire, the macro automatically starts when the window becomes active and captures the highlighted line in the clipboard. The next click of the mouse causes nothing to happen with Macro Express.

 

Does a click of the mouse cause the control to refocus itself? If not, macro express really disappoints because the Mouse click Activation really doesn't work at all.

 

Why does it seem like Macro Express needs a another program to get focus before it "reactivates itself" to realize that it needs to copy again?

 

What is Sam Hill is going on?

 

Pat

Link to comment
Share on other sites

OK,

 

I used the mouse click activation to trigger it and then did this:

 

<IFOTH:03:2:ACT! by Sage - PersonalInfo1><GETCONTROL:01:ACTSAGE.EXE:005:WindowsForms10.Window.8.app.0.2004eeeACT! by Sage - PersonalInfo1WindowsForms10.Window.8.app.0.2004eeeWindowsForms10.Window.8.app

.0.2004eeeTask ListWindowsForms10.Window.8.app.0.2004eeeWindowsForms10.Window.8.app.0.2004ee

e><VARGETCONTCLSS:1:1><IFVAR2:1:01:1:WindowsForms10.Window.8.app.0.2004eee><MSD:600><TEXTTYPE:<CTRLD>c<CTRLU>><ENDIF><CAPCONTROL:F:1:2:><VARGETCONT:2:2><ENDIF>

 

So when I click on the area, it checks to see if the window title is active and then does a Ctrl+C about 1 second later.

 

I am thinking about upgrading, but if the controls are still this pre-historic then I won't do it.

 

For example, you can capture text even when the window is minimzed, but the next time one reboots the computer, it says the control is not found. Well, is it or isn't it? The capture control function is SUPPOSED to Capture the control NOT a coordinate of a control. Yet, it is just awful it does that.

 

Until that gets fixed, and someone can chime in if it has, I am not buying the upgrade.

 

Pat

Link to comment
Share on other sites

For example, you can capture text even when the window is minimzed, but the next time one reboots the computer, it says the control is not found.

Some applications change the Windows Control information each time it runs. There is nothing Macro Express can do about that. Think about it this way, if you want to write a macro to detect a certain color in a specific location and the program changes that color each time it runs, you cannot use Macro Express to determine the pixel color.

 

The best work-around for programs that change their Windows Controls is to use the Capture Control command. But, the Capture Control command requires that you know the position of the control on the screen.

 

I use another work-around that may or may not work for you. Each time my macro fails because it cannot find the Windows Control I add another Get Control command to my macro without removing any previous Get Control commands. For this particular application I have had success with 5 separate Get Control commands:

  Get Control: (CLIENT.EXE) -> %C[7]%
 If Control "%C[7]%" Does Not Exist
Get Control: (CLIENT.EXE) -> %C[7]%
 End If
 If Control "%C[7]%" Does Not Exist
Get Control: (CLIENT.EXE) -> %C[7]%
 End If
 If Control "%C[7]%" Does Not Exist
Get Control: (CLIENT.EXE) -> %C[7]%
 End If
 If Control "%C[7]%" Does Not Exist
Get Control: (CLIENT.EXE) -> %C[7]%
 End If
 Mouse Click on Control %C[7]%

In other situations a macro can find the position of a Windows Control that does not change (C1), calculate the position of the Windows Control that changes (C2) using the position of the first Windows Control (C1), and use the Capture Control command.

 

Sometimes, no matter what you try, you cannot reliably use any Windows Control commands.

 

In summary, the behavior of how an application supports a Window Control depends entirely on that application. No program, including Macro Express, can change that behavior.

Link to comment
Share on other sites

  • 3 months later...

I went back to test this out and even this option doesn't work. First off, there is no "IF CONTROL DOES NOT EXIST". Second, none of these options work unless the window/program is visible. Capture Control does not work unless the window is visible. Only GET CONTROL works to capture text that is not visible(i.e. minimized)

 

I suggest that ME fix this by doing two things. FIRST, when a user uses "GET CONTROL" it also nails down the coordinates within it's own command. That way, whatever control is sitting in that location, it will capture the text there RELATIVE TO THE WINDOW AND THE EXACT SPOT ON THE WINDOW. You would think that when that bullseye wraps itself aound a control after the mouse is released over it, it would be able to smartly pick up all four corners or whatever geometric shape it is. I would rather have it this way than having to recapture/redo the control to reset the darn thing over and over again because the software is trying to throw a monkey wrench at the user.

 

Second, the CONTROL DETAILS window should be able to be manipulated by the user so that if I am observing that the control is being changed on the 3rd line of the hierarchical TREE, , then I should be able to tell it to stop at the second line(or whatever line I want it to stop). I cannot believe that the CONTROL DETAILS window in Macro Express is read-only! What? Why can't that be manipulated to fit the user's desire?

 

Combining both of these ideas would give the user reasonable assurance that the control captured using the "GET CONTROL" feature is the same one unless the control has been moved to another location. If the control is in a different location altogether, then the user has to start over or keep what is there and modify the code in the macro itself.

 

In summary:

#1) The coordinates captured by using "GET CONTROL" can give the program a reasonable approximation that the control is still there NO MATTER IF THE SOFTWARE CHANGES the control characteristics.

#2) The user should have full control to Stop/modify/manipulate whatever line in the CONTROL DETAILS that looks like it could give it a reasonable match.

 

Essentially, we can be reasonably sure that the control is still there no matter what the program does to change its own characteristics.

 

If you combine these two things and fix this issue, it would stop that ANNOYING sound and dialogue box from telling us the control does not exist. it would give us a better way to make a reasonable guess the same control is still there NO MATTER WHAT IT"S TRYING TO THROW AT THE USER BY CHANGING IT"S CHARACTERISTICS.

 

Please please fix this. PLEASE PLEASE PLEASE.

 

Pat

Link to comment
Share on other sites

Kevin,

 

I will, but what are the chances if the suggestion is implemented that it would be implemented for this version? If it is OK'd and implemented, how long will it take?

 

I am really upset that the control feature doesn't work at least in a semi-workable way. Everything else with Macro Express is pretty darn good.

 

Pat

Link to comment
Share on other sites

I will, but what are the chances if the suggestion is implemented that it would be implemented for this version?
The chance of us making the changes you request is zero if you do not make the request.

 

If it is OK'd and implemented, how long will it take?
Your request will be evaluated and prioritized with all other requests. We cannot say at this time when or if these specific suggestions will be implemented.

 

I am really upset that the control feature doesn't work at least in a semi-workable way. Everything else with Macro Express is pretty darn good.

How the Window Control commands work is limited by Windows. If they work for your application, fine. If they do not, then they do not. Is there room for improvement? Certainly. Is it possible to make the improvements you request? Maybe, maybe not.

 

"I am really upset that" you continue to claim that the Window Control commands do not work in "at least a semi-workable way." Many Macro Express users are using the Window Control commands in a variety of ways and many different applications. They are a very powerful feature of Macro Express and work great if the application you are automating allows them.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...