jimmyjmmy Posted October 19, 2008 Posted October 19, 2008 Hi, I wish to uncheck a checkbox in gmail.com and so I read the helpfiles. Looking at the helpfile example below, can someone tell me how to get the 'f' inside _IEFormGetObjByName? I have installed IE Developer toolbar. I know how to get the "q" for IEFormElementGetObjByName. Thanks #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm
DexterMorgan Posted October 19, 2008 Posted October 19, 2008 (edited) try something like this #include<IE.au3> $url = 'http://www.useit.com/alertbox/20040927.html' ; just an example you can change this to the website URL $checkbox = 'permission' ; just an example, change this to the ID of the checkbox $ie = _IECreate(); creates IE _IENavigate($ie,$url); navigates to the URL $obj_checkbox = _IEGetObjByName($ie,$checkbox); gets the checkbox by its name _IEAction($obj_checkbox,'click');clicks on the checkbox (checks it) sleep(2000) ; sleeps for 2 seconds _IEAction($obj_checkbox,'click');clicks on the checkbox again(unchecks it) sleep(2000) ; sleeps for 2 seconds _IEAction($obj_checkbox,'click');clicks on the checkbox (checks it again) not tested but should work Edited October 19, 2008 by DexterMorgan code
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