shalini Posted July 11, 2016 Posted July 11, 2016 Hi, I have an Issue that,I have written a code in AUTOIT for protected mode using IE Browser ,I code runs perfectly .But the thing is"If before running AUTOIT code The user has done the protected mode setting manually ,Then my code will disables the that particular CHECKBOX". Can anyone suggest me How to overcome this issue.
MichaelHB Posted July 11, 2016 Posted July 11, 2016 Hi shalini, Can you explain better what is not working and show us some code to help understand what are you doing? From what i could understand you want to keep the protected mode checkbox CHECKED, and when its already CHECKED (you are probably doing some click) its gets UNCHECKED, am i right? This is the control you want to keep CHECKED?
shalini Posted July 12, 2016 Author Posted July 12, 2016 Yeah,ur correct,according to ur screenshot ,if its alrdy clicked Then my code is runned,It will Unchecks the particular checkbox.But my question is ,"By putting a condition i have to get t know,That particular checkbox is Checked or Unchecked,If it s enabled ,It should not make any changes to that particular checkbox". and my code as follows... WinWaitActive("Home - Windows Internet Explorer") Sleep(2000) Send("!t") Sleep(2000) Send("{UP}") Send("{ENTER}") sleep(2000) WinWaitActive("Internet Options") Send("^{TAB}") Send("{TAB}") Send("{TAB}") Sleep(2000) Send("{SPACE}")------------------------------>Here" how to give Condition for particular checkbox is checked or unchecked".
MichaelHB Posted July 12, 2016 Posted July 12, 2016 shalini, There is better ways to automate this task (i would go for change regkey - here can give you a start). I know that if you have no clue how to do it in autoit you will need some time to learn and you can start reading the helpfile about regkeys, you could start with "RegRead" function. In the meanwhile you can change your last line [Send("{SPACE}")] for this: ControlCommand(WinGetHandle("Internet Options"), "", "Button3", "Check", "") Remeber that the title (Internet Options) is in english and may change if you have a different language in you system, also use the Autoit Window Info to confirm the control class. Also you can change all your "Send" functions for the "Control...", this is a better way to automate this window.
shalini Posted July 13, 2016 Author Posted July 13, 2016 Thanks for the precious reply.Can u plz gve sme code for that particular checkbox using "regkey" (Some related examples and also how to specify with condition,that it s clicked or not)
MichaelHB Posted July 13, 2016 Posted July 13, 2016 Did you read the link that i provided (the information is very clear with you first study and understand the regkey autoit functions) ? Did you understand what is a "regkey" (Windows Registry) ? Let me see what have you tried with the examples in the helpfile that is not working. I already gave you the answer to always select CHECKED in that checkbox using a "ControlCommand", did you tried?
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