frozensmilz Posted December 26, 2008 Share Posted December 26, 2008 Hello, I am planning to create a script...... Expected Input: Main Window Title or Main Window Process ID Expected Output: 1. Main window ID: XXXXX (required) 2. Number of Child Windows opened by that main window: XXXXX (required) 3. Window Title of the Active Child Window: XXXXX (required) 4. Number of GUI Components in Main Window: XXXX (ex: 1 TOOLBAR, 3 TEXTBOX, 5 COMBOBOX etc) 5. GUI Component Type & GUI Control Id in that Child Window: (required) Number of GUI Components in Child Window: XXXX (ex: 1 TOOLBAR, 3 TEXTBOX, 5 COMBOBOX, 1 BUTTON etc) GUI Component Types, its content(TEXTBOX & LABEL only), its Control Id & coordinates in active Child Window:XXXXX (ex: COMBOBOX:2200,x20y0, TEXTBOX(Hello world):3300,x30y30, LABEL:(Message)3300,x0y0) I have already created a script that can simulate key board activities.....i used to use window title to pass the control to newly popped up child window....But unfortunately i am facing a kind of window whose title is generated in random....so my script cannot determine which child window it should use for next set of actions......If i can get the above mentioned information about the child window atleast i can add more features that will simply count or capture the newly popped up window (not by its title)....by its PID or control ID....... I am not expecting any perfect help...I just know what i need but i am not that expert in autoIt & net is so huge to get the right answer...if possible just give me any good starting somewhat like... 1. How can my script sense a newly popped up window (not by its title using WinWait()) ? 2. How can i get the control id of the GUI components in child window (previously i used to use AutoIt Window Info, but now my network admin has installed mcAfee which i believe scrambles the Control ID's making it random after a certain period of time, so my script makes use of TAB and Arrow key actions to navigate the entire GUI components which is terrible if the movement delay is interrupted by any external event) ? My current script can automate data entry in an old C built system using keyboard simulations (makes the automation difficult). Its Input is : a text file containing key board actions, values, child windows to be taken care of.. etc. 1. While executing i need to make the desired window active by mouse click 2. I wont be able to do any thing in my PC till the script finishes (Any suggestions to freeze the window so that i can browse net at the same time.....I am planning to do this on VMWare, but the memory is gonna cry ????) The below is the sample language which is the input....the script file works like a compiler that will understand what keyboard actions (luckily the system has some pre built keyboard actions that allows to manipulate GUI actions without the mouse) i want to do with the GUI CROIRE.COMMENCER RESERVED.COMMENCER TITLE=CCFM Add RUN=1 DELAY=10 WIN=Marketing Location Number One - PP/1/CM\Create CCF RESERVED.ENFIN VALUES.COMMENCER CUS=1000001 GTR=1000002 CCF=JUNKET CW1=Create CCF VALUES.ENFIN SET.COMMENCER NULL SET.ENFIN PLAY.COMMENCER CUS,$TB $TB,$TB,$TB 100000,$ER CCF,$ER $SE,$ER $ER,$SE $ER,$ER $ER,LOW,$ER $TB TEST,$TB AB123456CD,$TB AIMB,$TB ROAD 512,$TB 666-123456,$TB $TB,$TB,$TB,$TB,$TB,$TB,$TB,$TB BTH1 {ALT}+{s}+{ENTER} $WWC=CW1\NULL PLAY.ENFIN CROIRE.ENFIN where $TB is TAB, $ER is ENTER, WIN will take care of main window......while rest of all are data to be entered, $WWC is will wait for child window to be closed Thanks in advance......... Link to comment Share on other sites More sharing options...
rasim Posted December 26, 2008 Share Posted December 26, 2008 frozensmilzWelcome to the forum! Some examples:$sTitle = InputBox("MyProgram", "Type a window title", "Untitled - Notepad") If @error Then Exit $hWnd = WinGetHandle($sTitle) If @error Then Exit MsgBox(16, "Error", "No window matches the criteria") $sClassWindow = WinGetClassList($hWnd) $aString = StringSplit(StringTrimRight($sClassWindow, 1), @LF) $iControlsNumber = $aString[0] MsgBox(0, "Result", "Window handle: " & @LF & _ $hWnd & @LF & @LF & _ "Amount of controls" & @LF & _ $iControlsNumber & @LF & @LF & _ "Window controls:" & @LF & _ $sClassWindow)Also search on the forum:EnumChildWindows ControlGetHandle WinGetStasteGood luck 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