kfuller Posted May 11, 2007 Share Posted May 11, 2007 I'm automating a video distribution app from Leightronix called WinNET. I have been able to open the app, open a config file, and launch the control panel window of the application. The issue now is that beyond scripting the mouse position (which I haven't attempted yet) I cannot reference any of the controls in this window. I believe it to be a child window because while it has a title, the main program window is all that is listed in task manager.Here is what I've tried that has worked, well sort of anyways:-AutoItInfo shows the title as "NET-164 Control Panel" w/ a class id = "#32770". If I have set WinTitleMatchMode=4 Then I can perform a WinExists on the classname but not on the title itself.-Running the function _getClasses found in the AutoIt Wrappers post http://www.autoitscript.com/forum/index.ph...=19370&st=0 returns only 1 class of unknown type called "msctls_trackbar32"Any ides on what I can do to access controls within this window? The AutoItInfo tool does provide what appear as valid control refrences (i.e. Button138 or Control ID 1260)Thank you for any assistance you can provide.-Kirk Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 11, 2007 Share Posted May 11, 2007 The AutoItInfo tool does provide what appear as valid control refrences (i.e. Button138 or Control ID 1260)Does that mean none at all, or just not that you recognize? If there are control IDs or especially ClassNameNN for any of the controls, post them.The bad news is some apps draw their own graphics without using Windows API or standard controls (ColdFusion for example) and AutoIt can't touch the "controls" at all. Your window may not fall into this category, but it might... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
kfuller Posted May 11, 2007 Author Share Posted May 11, 2007 All controls that I want to access are listed. Here are the main ones I am trying to hit. The program works by clicking an output button or combo of output buttons then clicking on the appropriate input button you want to assign. Window Itself: Title: NET-164 Control Panel Class: #32770 1 Output Button on the window (4 of these possible) Control ID: 1260 ClassNameNN: Button138 Text: 1 1 Input Button on the window (16 of these possible) Control ID: 1349 ClassNameNN: Button 140 Text: 3 After looking at the window with the info tool using the magnify feature I'm seeing some weird stuff. Looks like as I mouse over the first output button depending on where I'm at I am seeing upwards of 3 buttons, perhaps each a separate instance of the buttons state (normal, pressed, etc). Additionally I should note the window states (Control is hidden). I've tried using CommandShow("classname=#32770","",1260) but this hasn't seemed to have any effect. I am beginning to believe that you are correct and that the window may be generated by the program w/o the use of standard window api calls. Link to comment Share on other sites More sharing options...
PsaltyDS Posted May 11, 2007 Share Posted May 11, 2007 (edited) I have another possibility for you. Stacked controls. I've seen this in some apps (coded by lazy programmers who should be forced to watch a complete set of 'The View' re-runs while tied down in Rosey O'Donnel's lap). As an example, I've seen the NEXT button will be disabled and hidden, then the FINISH button enabled/unhidden in the same location. There is bug/feature about AutoItInfo that only one of theses stacked button's info will be displayed. When the "Click next to continue" window is up, AutoItInfo shows Button1, CtrlID = 3, text = "&Next". After you click next, the FINISH button is now there but AutoItInfo shows the exact same stuff for NEXT, except you notice the button is currently disabled and hidden. The trick with this (if that's what's happening in your case) is to do a loop that tries to do ControlGetText() on various button combinations like Button130 thru Button150. That will help find the right one. P.S. You might try ControlShow() vice CommandShow() Edited May 11, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
kfuller Posted May 11, 2007 Author Share Posted May 11, 2007 I definitely think something is odd in their code. I decided to try one last attempt at seeing the window by using "active" for the window name. When I sent that to the _getClasses function I returned the following:expandcollapse popupStatic1 SysListView32? #32770? Button1 Static2 Static3 Static4 Static5 Static6 Static7 Static8 Static9 #32770? Button2 Static10 Static11 Static12 Static13 Static14 Static15 Button3 Button4 Button5 Button6 #32770? Button7 Static16 Static17 Static18 Static19 Static20 Static21 Static22 Static23 Button8 Button9 Button10 Button11 Button12 Button13 Static24 SysDateTimePick32? msctls_updown32? #32770? Button14 Static25 Static26 Static27 Static28 Static29 Static30 Static31 Static32 Button15 Button16 Button17 Button18 Button19 #32770? Button20 Static33 Static34 Static35 Static36 Static37 Static38 Static39 Static40 Button21 Button22 Button23 Button24 Button25 #32770? Button26 Static41 Static42 Static43 Static44 Static45 Static46 Static47 Static48 Static49 Static50 Static51 Static52 Static53 Static54 Static55 Button27 Static56 Static57 Static58 #32770? Button28 Static59 Static60 Static61 Static62 Static63 Static64 Static65 Button29 Button30 Button31 Button32 Button33 Button34 Button35 Button36 Button37 Button38 Button39 Button40 Button41 Button42 Button43 Button44 Button45 Button46 Button47 Button48 Button49 Button50 Button51 Button52 Button53 Button54 Button55 Button56 Button57 Button58 Button59 Button60 Button61 Button62 Button63 Button64 Button65 Button66 Button67 Button68 Button69 Button70 Button71 Button72 Button73 Button74 Button75 Button76 Button77 Button78 Button79 Button80 Button81 Button82 Button83 Button84 Button85 Button86 Button87 Button88 Button89 Button90 Button91 Button92 Button93 Button94 #32770? Static66 Static67 Static68 Button95 Static69 Button96 Static70 Button97 Static71 Button98 Static72 Static73 Static74 Static75 Button99 Button100 Button101 Button102 Button103 Button104 Button105 Button106 Button107 Button108 Button109 Button110 Button111 Button112 Button113 Button114 Button115 #32770? Button116 Static76 Static77 Static78 Button117 Static79 Button118 Static80 Button119 Static81 Button120 Static82 Static83 Static84 Static85 Button121 Button122 Button123 Button124 Button125 Button126 Button127 Button128 Button129 Button130 Button131 Button132 Button133 Button134 Button135 Button136 #32770? Button137 Static86 Static87 Static88 Button138 Static89 Button139 Static90 Button140 Static91 Static92 Static93 Static94 Button141 Button142 Button143 Button144 Button145 Button146 Button147 Button148 #32770? Button149 Static95 Button150 Static96 Static97 Static98 Static99 Button151 Button152 Button153 Button154 Button155 Button156 Button157 Button158 Static100 Static101 Static102 Button159 It seems that the original window I'm trying to reference is listed multiple times. I'm not sure what is going on but I do know that using "active" I have been able to click on the OK button in the window. I think that with some trial and error I can find the correct button for the inputs/outputs. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now