maxchock Posted March 15, 2007 Share Posted March 15, 2007 Hi all, I'm learning to code AutoIt, so i pick a installation program to learn and test . I have problem until the last step of the installation , as the last screen asking whether i want to Launch the installed program with a CheckBox to select. But i have no luck try ControlCommand / ControlSend and even ControlClick. and after playing with the Window Info tools, I still can;t figure out the real classname for the CheckBox. However, i have try few way, of doing it.. here is my code..: WinWaitActive("Setup - Almeza MultiSet 3.5","Completing the Almeza MultiSet 3.5 Setup Wizard") ;ControlSend("Setup - Almeza MultiSet 3.5", "", "Launch MultiSet","{NUMPADSUB}") <---- previously using this. ControlCommand("Setup - Almeza MultiSet 3.5","&Finish","Lauch MultiSet","UnCheck","") Send("!f") any idea where i did wrong?? Thanks & regards, Max. Link to comment Share on other sites More sharing options...
enaiman Posted March 15, 2007 Share Posted March 15, 2007 Why don't you try to see where the focus is when the window opens? If the focus is on the "Finish" button if you send a TAB the focus will move on your checkbox (you can see that because the text will be sorounded by a discontinuous rectangle). Once you get the focus on that by sending a SPACE will check/uncheck it. So If the focus is on Finish (i.e. if you hit the ENTER key that button is pressed) you can use this sequence: WinWaitActive("Setup - Almeza MultiSet 3.5","Completing the Almeza MultiSet 3.5 Setup Wizard") Send("{TAB}") Send("{SPACE}") Send("!f") I remember reading somewhere that sending "+" wil check/uncheck the checkbox ... but I'm not so sure ... so - better try sending SPACE and see what happens. I know this isn't a so easy way and it can be done nicely by correctly grabbing the checkbox's ID but unfortunately sometimes is very difficult to get it using the Active Window Info. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) Link to comment Share on other sites More sharing options...
maxchock Posted March 16, 2007 Author Share Posted March 16, 2007 WinWaitActive("Setup - Almeza MultiSet 3.5","Completing the Almeza MultiSet 3.5 Setup Wizard") Send("{TAB}") Send("{SPACE}") Send("!f") I remember reading somewhere that sending "+" wil check/uncheck the checkbox ... but I'm not so sure ... so - better try sending SPACE and see what happens. I know this isn't a so easy way and it can be done nicely by correctly grabbing the checkbox's ID but unfortunately sometimes is very difficult to get it using the Active Window Info. Thanks for reply. I really think of using the ControlID or ClassName if possible. But if no choice, then i may have to use it that way. Thanks. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 16, 2007 Moderators Share Posted March 16, 2007 Thanks for reply. I really think of using the ControlID or ClassName if possible. But if no choice, then i may have to use it that way.Thanks.It's like their setup window is a child of a child of a child... gets rediculous when you get 3/4 of the way through it, and the window text isn't even recognized anymore even with WinSearchChildren and WinDetectHiddenText... I got almost done the automation myself with controls before I decided it was a pain in the ass. I'm curious... why do something like this anyway (trial software)? Why not just use NSIS? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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