Rishav Posted September 26, 2008 Posted September 26, 2008 Hi folksCurrently i am working of a software which has buttons quite similar to MS excel toolbar buttons.this creates a problem in getting the control id for automation as .net all the buttons on the toolbar have the same class-instance names.in general, lets say i want to click on the Bold button on the Excel toolbar. how can i do that?using;ControlFocus("Microsoft Excel - Book1","","CLASS:MsoCommandBar; INSTANCE:1")just tries to click the toolbar itself instead of that very button.
sb1920alk Posted September 26, 2008 Posted September 26, 2008 Hi folks Currently i am working of a software which has buttons quite similar to MS excel toolbar buttons. this creates a problem in getting the control id for automation as .net all the buttons on the toolbar have the same class-instance names. in general, lets say i want to click on the Bold button on the Excel toolbar. how can i do that? using ;ControlFocus("Microsoft Excel - Book1","","CLASS:MsoCommandBar; INSTANCE:1") just tries to click the toolbar itself instead of that very button.Is there a reason you can't just use something like Send("^b")?
PsaltyDS Posted September 26, 2008 Posted September 26, 2008 (edited) Hi folks Currently i am working of a software which has buttons quite similar to MS excel toolbar buttons. this creates a problem in getting the control id for automation as .net all the buttons on the toolbar have the same class-instance names. in general, lets say i want to click on the Bold button on the Excel toolbar. how can i do that? using ;ControlFocus("Microsoft Excel - Book1","","CLASS:MsoCommandBar; INSTANCE:1") just tries to click the toolbar itself instead of that very button. That's because "CLASS:MsoCommandBar; INSTANCE:1" IS the toolbar, not the button. P.S. You might check out this topic: winwait, for selection of menus Edited September 26, 2008 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
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