purpleblue Posted October 1, 2005 Share Posted October 1, 2005 Hi! I try to automate the installation of some programms. My problem is, that everytime I run the setup, the 'Next'-Button gets a different Control ID. In the AutoIt help file its said, that using this ID is the best way to access single controls via the ControlClick-function. So is it normal for the ID to change or were's the point? BTW: I tried to search for postings concerning my problem, but the forum search won't let me use + and " in one statement Thx a lot for your help! Link to comment Share on other sites More sharing options...
Developers Jos Posted October 1, 2005 Developers Share Posted October 1, 2005 Hi!I try to automate the installation of some programms. My problem is, that everytime I run the setup, the 'Next'-Button gets a different Control ID. In the AutoIt help file its said, that using this ID is the best way to access single controls via the ControlClick-function. So is it normal for the ID to change or were's the point? BTW: I tried to search for postings concerning my problem, but the forum search won't let me use + and " in one statement Thx a lot for your help!What is the exact information that AU3_Info.exe gives for this control ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
purpleblue Posted October 1, 2005 Author Share Posted October 1, 2005 What is the exact information that AU3_Info.exe gives for this control ?For example during the installation of Protowall:>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Setup - ProtoWallClass: TWizardFormSize: X: 278 Y: 91 W: 501 H: 390>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 632 Y: 454Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0xF6F6F2 Dec: 16185074>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: 325 Y: 326 W: 75 H: 23Control ID: 852204ClassNameNN: TButton1Text: &Next >>>>>>>>>>>> Status Bar Text <<<<<<<<<<<>>>>>>>>>>> Visible Window Text <<<<<<<<<<<WelcomeWelcome to the ProtoWall Setup WizardThis will install ProtoWall 2.0 Beta on your computer.It is recommended that you close all other applications before continuing.Click Next to continue, or Cancel to exit Setup.&Next >Cancel>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<MainSelectComponentsFull installationInfoBeforeProtoWall 2.0 Beta====================================IMPORTANT NOTE!During installation, you will get three warning messages. Click "Continue Anyway" each time to complete the installation of ProtoWall.For additional information, visit the following sites:ProtoWall Helphttp://www.bluetack.co.uk/pwhelpBluetack Forumshttp://www.bluetack.co.uk/phpn2/index.phpWhat is ProtoWall?If you p2p like I do, you cannot have enough security against prying eyes that have invaded the community. Drastic measures have been taken by the likes of the Riaa and Mpaa, as well as all the Sub-Contracted cronnies of the movie and record industry. Introducing their worst nightmare. "ProtoWall + The Bluetack Blocklist manager." ProtoWall Blocks incoming packets from Internet addresses that are on the Bluetack Blocklist. The Blocklist is supported Globally and then is sorted (Overlapping Resolved) and then converted to various formats (ProtoWall, PeerGuardian, Emule, ect.).Please note that "Beta" means the application is not done. ProtoWall 2.0 can be judged properly when it goes final.ProtoWall - Copyright© 2003-2004 by DudeZ. All rights reserved.Starting the Setup another time brings:>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: Setup - ProtoWallClass: TWizardFormSize: X: 217 Y: 72 W: 501 H: 390>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 570 Y: 434Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0xF6F6F3 Dec: 16185075>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: 325 Y: 326 W: 75 H: 23Control ID: 1442002ClassNameNN: TButton1Text: &Next >>>>>>>>>>>> Status Bar Text <<<<<<<<<<<>>>>>>>>>>> Visible Window Text <<<<<<<<<<<Welcome....I know I could use the Send-funktion instead, but I though these IDs were constants Link to comment Share on other sites More sharing options...
this-is-me Posted October 1, 2005 Share Posted October 1, 2005 They are only constant in programs that do not dynamically create the gui at runtime. You can easily use "TButton1" or "&Next >", since this is what the average autoit user does anyway to make readability easier. Who else would I be? Link to comment Share on other sites More sharing options...
purpleblue Posted October 2, 2005 Author Share Posted October 2, 2005 They are only constant in programs that do not dynamically create the gui at runtime. You can easily use "TButton1" or "&Next >", since this is what the average autoit user does anyway to make readability easier.Thx, I started doing so already. Its only that the descritption in the helpfile made me think, these ID did a better job somehow. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 2, 2005 Developers Share Posted October 2, 2005 Thx, I started doing so already. Its only that the descritption in the helpfile made me think, these ID did a better job somehow.I am nearly always using the ClassName since that normally stays the same.... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Mikey Posted October 6, 2005 Share Posted October 6, 2005 Thx, I started doing so already. Its only that the descritption in the helpfile made me think, these ID did a better job somehow.Hey purpleblue, ya I know what you mean, in the helpfile it shows this > ControlClick ( "title", "text", controlID [, button] [, clicks]] )Parameterstitle The title of the window to access. text The text of the window to access. controlID The control to interact with. See Controls. button [optional] The button to click, "left", "right" or "middle". Default is the left button. clicks optional] The number of times to click the mouse. Default is 1. ... nothing about ClassNameNN. It took me a while to figure this out also. It would definely help us newbs if the different id's that could be used were spelled out. (maybe it was... only we missed it?) Regardless, so far I LOVE Autoit! Thanx Jon et al! Link to comment Share on other sites More sharing options...
LxP Posted October 6, 2005 Share Posted October 6, 2005 Welcome to the forums Mikey!Just for anyone who also wonders, the link included with the explanation for controlID (which shows this page) explains all of the types of information that can be used there (control ID, ClassNameNN, text and control handle). Link to comment Share on other sites More sharing options...
t0ddie Posted October 6, 2005 Share Posted October 6, 2005 what can you do if the ClassName is blank? Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
LxP Posted October 7, 2005 Share Posted October 7, 2005 I doubt that the ClassNameNN would ever be blank because as far as I can tell, AutoIt 'creates' this way of identifying controls for each control.In such an event you would probably need to resort to _ControlGetHandleByPos(). Link to comment Share on other sites More sharing options...
Valik Posted October 7, 2005 Share Posted October 7, 2005 (edited) AutoIt 'creates'AutoIt does no such thing. The "classnameNN" is a composite construct. The "classname" part is the class name of the control used in the CreateWindow() API call. The "NN" part is a number AutoIt uses to distinguish individual instances of the same type of control. Using the word "create" is a bit too strong of a word for what AutoIt actually does. "Builds" would perhaps be a better choice.A blank classname means there is no control under the mouse. Edited October 7, 2005 by Valik Link to comment Share on other sites More sharing options...
LxP Posted October 7, 2005 Share Posted October 7, 2005 I doubt that the ClassNameNN would ever be blank because as far as I can tell, AutoIt 'creates' this way of identifying controls for each control.The ClassName obviously originates from the controls in question but through the use of a numeric suffix, AutoIt does in fact create its own method for uniquely identifying those controls of a common class. Apologies to anyone who was misled by my drivel. Link to comment Share on other sites More sharing options...
sfunk1x Posted October 21, 2005 Share Posted October 21, 2005 So, what would one do when there is no text to distinguish the controls, the ControlID changes each time the window is opened, and the ClassnameNN changes when controls are manipulated? For instance: In a startup menu, a user has an option to do a variety of things, create a project, open a project, edit a photo, etc. If you look at the ClassnameNN of the Create Project button before you click it, it will say WindowsForms10.window.8.app711, but after you click on it, it will be WindowsForms10.window.8.app712, and WindowsForms10.window.8.app711 is assigned to another control on that same menu. The original classnameNN of WindowsForms10.window.8.app711 is never reassigned to the first command for the length of time that window is open. Is there another way to identify these controls more specifically, and permanently? Link to comment Share on other sites More sharing options...
LxP Posted October 21, 2005 Share Posted October 21, 2005 (edited) That would be when you consider manipulating controls via their positions.Edit: I'm going to rewrite that function so you may want to watch that space. Edited October 21, 2005 by LxP Link to comment Share on other sites More sharing options...
sfunk1x Posted October 24, 2005 Share Posted October 24, 2005 Awesome. I don't know if I'm going to have time this week to implement this and start working on that portion of things, but I will be very soon. Just getting busy with another project... but this one needs to be finished too. Or more finished :-P Thanks for the help. 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