Jump to content

DanSut

Members
  • Posts

    3
  • Joined

  • Last visited

DanSut's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I have been creating an include file for a bunch of UDFs that give me a cleaner interface to a bunch of functions in a DLL - that bit is working fine. I would like to cause these functions to do nothing if I defined something before the #include - a similar action to substituting a different include file with the same functions defined but with them all empty. In C like languages I would use a #ifdef but I can't find anything like that in AutoIt's language. If thought there might be some way to test if a variable had been defined, using one undefined seems to just give an error though. Thought there might be an exists($varname) or defined($varname) but I also can't find anything like that I feel sure that there must be some way of achieving my goal without having real and null versions of the include that I switch in and out - I seem to just not be thinking too clearly. All the terms I can think of to search on seem to get me a million answers all of which are unrelated to my goal - I guess the terms are just too generic in a programming environment. All suggestions will be gratefully received
  2. Thanks for the response Ran your script and got some very interesting results: the child windows of the MDI didn't show up but a whole host of other windows that weren't visible (or useful to me) did I have taken your advice and am using handles though to keep track of things - what I've ended up doing is cycling through my child MDI windows using Ctrl+F6 and using the fact that the ClassNameNN of the MDI child in focus is reliable and the Text tells me which window it is ... having done this and saved the handles I can then get the child window I want in focus easily. Once I have a known in focus I just treat it as if it is the main window and ignore the others. Oh for reference - the shortcut for opening a child MDI's (document's) control menu is Alt+- this turned out to not be much use for me at this point but maybe useful yet. The custom toolbar looks just like legwork of knowing what buttons are on it, how big they are and their order... Now I just need to work out how I'm going to deal with this wacking great custom control of a table that is in many of my child windows - looks like it is impossible to extract text out of it which I'd really like to do. Thanks again for the advice.
  3. My first post here - only recently discovered AutoIt and I must say I'm impressed - thanks to all involved in the tools and their community. Not sure if I'm going to be able to get much help here as I'm trying to script a proprietary internal DB access application that I can't give you access to and is an MDI with some custom controls The purpose of the scripting is to perform QA tests - functional, regression and eventually performance testing... if anyone can even point me in vaguely the right direction it would be most appreciated. The child windows of this MDI app seem to be identified as Controls (not Windows) - they share all the same ClassNameNN with a unique dynamic numeric suffix added and their ControlID's are generated on the fly, so they can only really be identified by their Text (child window title). The weird thing (to me) is that the child windows will switch ClassNameNNs as focus is switched between them - the child window with the focus seems to always have a suffix of 1. Many of the child Windows contain a toolbar which is custom control that is essentially the same for each window (although its actions are just for that child window) - this toolbar has the same ControlID, no Text, and the same ClassNameNN with a unique dynamic numeric suffix for each child windows toolbar. As above, the ClassNameNN seems to switch dependent of the focus. I have 3 main questions: How should I identify a specific one of these child windows to give it the focus?Once given focus I can close a child window using the Ctrl+f4 shortcut but I can't work out a good way to activate its menu or tools minimize, maximize, etc. Will there be a shortcut - if there is what is a good way to find it?Do I have to just have to do a ControlGetPos() on the custom control toolbar and then use pixel mouse positioning and clicking to activate? Or is there a better way?Searching in the docs and here made me think I could set Opt(WindowSearchChildren,1) and treat each child window as an individual Window but that doesn't seem to work at all for my app - at least my script never finds the child windows given their titles. Any pointers, clues, or commiserations are welcome. /dan
×
×
  • Create New...