Vos Posted January 31, 2011 Share Posted January 31, 2011 quick question i have a button with specs. >>>> Control <<<< Class: ThunderRT6TextBox Instance: 12 ClassnameNN: ThunderRT6TextBox12 Name: Advanced (Class): [CLASS:ThunderRT6TextBox; INSTANCE:12] ID: 10 Text: Data Flash i can click on the button using the code $windowname = WinGetTitle("[active]") ControlClick($windowname, "", "[CLASS:ThunderRT6TextBox; INSTANCE:8]") however the button changes the instance number depending on which screen i am on. The Txt on the button stays the same (Data Flash). Am able to use control click on this button using just the txt? and if i also had buttons with hidden txt could i click on those as well(without using the instance number). please post the text that you think would work, i have tried many different ways and cant seem to do it. Thanks in advance Link to comment Share on other sites More sharing options...
willichan Posted January 31, 2011 Share Posted January 31, 2011 ControlClick($windowname, "", "Data Flash") My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Vos Posted January 31, 2011 Author Share Posted January 31, 2011 that doesn't work... does it matter that they are split on two levels? Data Flash The window info text recognizes it as two lines. if so how do i mimic that? Link to comment Share on other sites More sharing options...
willichan Posted January 31, 2011 Share Posted January 31, 2011 (edited) Yes. Doing it this way seems to require the exact control text. Try using the AutoIt Window Info tool. You can copy/paste the exact control text from there into your script to get it to work. ----Edit---- I have only tested this with WinXP SP3. I don't know how well it will work with other OS versions. Edited January 31, 2011 by willichan My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Vos Posted January 31, 2011 Author Share Posted January 31, 2011 That seems to work for the Hidden txt but not the visible. is there a way to distinguish between? Link to comment Share on other sites More sharing options...
willichan Posted February 1, 2011 Share Posted February 1, 2011 That seems to work for the Hidden txt but not the visible. is there a way to distinguish between?Try using the 'Summary' tab of the info tool. It will show all of the info at once. Visible text in the '>>>> Visible Text <<<<' section, and hidden in the '>>>> Hidden Text <<<<' section. What you are looking for, however, is in the '>>>> Control <<<<' section next to the 'Text:' tag.Make sure that you are hovering over the control you want to click, then freeze the display (strl-alt-f) before you copy the control text. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Am3oo Posted October 26, 2012 Share Posted October 26, 2012 what if the Control has a bunch of text lines which show up in the Visible text list, but Window Info can't select them individually? Can you click on an element of the Visible Text list in a control? Link to comment Share on other sites More sharing options...
willichan Posted November 8, 2012 Share Posted November 8, 2012 I am not quite sure what you are referring to. Each line of visible text is not necessarily a different control. You should look in the Control section for the Text tag. If you are looking in the visible text section, you are seeing text for the window, not just the control you are hovering over. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash 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