blopib Posted August 29, 2008 Report Share Posted August 29, 2008 Uhh, we're do I start... I work in a interface connected to a database (IFS Appl.) and I'm trying to get control function to work, but after a bit of testing I've come to a point where I'm stuck. Maybe it's nothing to do, I think I still can work my way around (with a not so elegant solution). I wonder if any of you experts can help me out with this. In IFS appl. there's a lot of windows to use and the trouble is that get control doesn't recognize the different child windows, Joe describes my problem in ME explained page 337, "Still other applictions assign a seemingly random index number"....."and there is no way to predict what index number will be" There's a suggestion that one could use the capture control, but my problem is that the position of the child windows never are the same. I'am just thinking, could Me catch something else to control? -When looking at properties of this different windows in IFS appl. there is an Identity e.g frmInventoryLocation, is that something that I could catch? This not easy to answer if you haven't seen the application offcourse, I understand that. Or the Window Text shown in the Capture Window Control? This is name is always the same, it would be great if I could use that! I guess it's not possible to catch these things otherwise it would already be possible. Is there someone who has any clever thoughts about this, I would be glad to hear them..... Greetings from a 40 year old BF Heroes Beta-tester.... Quote Link to comment Share on other sites More sharing options...
patgenn123 Posted August 29, 2008 Report Share Posted August 29, 2008 Hi! The only solution I have for you is to look at either AutoIT or AutoHotKey. They have control capture devices(for free) within the "free" programs that could capture what you want. Now I am NOT 100% sure because I am learning these two programs(and yes, I get confused) if it exists entirely the way you want it, but you could at least get the information from the "Control Capture" these two programs offer and blend it into ME. -P Quote Link to comment Share on other sites More sharing options...
blopib Posted September 2, 2008 Author Report Share Posted September 2, 2008 Thanks for the tip Pat, but I can't install any freeware at work, I want to solve this by using the great program of ME..... Isn't it possible to somehow get Window Text shown in the Capture Window Control? Kevin? Joe? Anyone one else who has a suggestion? If I could solve this problem with this index-windows in IFS application, it would open up a bunch of other possibilitys... Quote Link to comment Share on other sites More sharing options...
Ryanra2 Posted September 2, 2008 Report Share Posted September 2, 2008 Since your windows are likely to appear in different places, I would suggest using the "Get Control" function. With this you can use the "Launch Get Control Utility" to target the specific window\form you are trying to access. It also has an option for "Get Control Using Text", although I've not needed to use that function very often. Quote Link to comment Share on other sites More sharing options...
kevin Posted September 2, 2008 Report Share Posted September 2, 2008 Isn't it possible to somehow get Window Text shown in the Capture Window Control?Kevin? Joe? Anyone one else who has a suggestion? The only piece of information you can currently get from the Control information itself is the class using the Variable Get Control Class: %C1% to %T1% command. Would this help? Quote Link to comment Share on other sites More sharing options...
rberq Posted September 2, 2008 Report Share Posted September 2, 2008 I may be misunderstanding your problem. If so route me to the bit bucket. I have a VB application that displays several windows with different titles. The windows contain text box controls which the application has put data into. A separate macro is activated for each window based on window title. The macro does a Get Control for each text box, then a Get Control Text to "read" whatever data is in the text box. So maybe you could recognize your many different windows by starting an independent macro for each distinct window title. As to capturing controls inside the window, I'm not sure if mine works simply because the windows are always in the same location, or whether it would work with random locations like you have. I guess I should check that out ... maybe what I considered to be so clever is working only because of dumb luck. Quote Link to comment Share on other sites More sharing options...
blopib Posted September 3, 2008 Author Report Share Posted September 3, 2008 Thanks for all the tips and keep sending me if you have some more ideas. Yes, I know about the Get control, Launch Get Control Utility and Get Control Using Text, through Joe/Kevins eminent ME explained. I have a bunch of different child-windows in this application that I have to access, and the macro is going to be quite advanced (by my means anyway) so going thru the code to adjust control for different positions before using it the next time, isn't an option. I've got it working with some of the windows but somehow the "Get function" does not recognize one of the windows containing sheet/laps? I'm probably going for my "ugly solution", that is to launch the needed amount of application with the right window maximized and then call the right one with Activate Window needed for that task and then switch to next, just to plough through the work thats waiting. Just another thought, I think I have to start another tread, Maximize Window with the result in C1? Can that be done? 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.