PinkAngel Posted September 24, 2009 Posted September 24, 2009 Hi, I am working on a script that will automatically log in to our web page. My problem is that the login button which AutoIT should automatically click is an image with the following details: <input type="image" src="/static/images/login.gif"> How do I reference this control if I want to use ControlClick or ControlSend? I am new to AutoIt and your valuable help is greatly appreciated. thanks, PinkAngel
nfaustin Posted September 24, 2009 Posted September 24, 2009 Hi PinkAngel, Is it is necessary for you to use ControlClick() or ControlSend()? Why don't you use _IEImgClick() in IE UDF? Its more faster and easy way. #include <IE.au3> $oIE = _IE_Example ("basic") _IEImgClick ($oIE, "http://www.autoitscript.com/images/autoit_6_240x100.jpg") Just a suggestion. [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
PinkAngel Posted September 24, 2009 Author Posted September 24, 2009 hi nfaustin, thanks for the quick reply. I tried _IEImgClick but it didn't work. thanks, PinkAngel
nfaustin Posted September 24, 2009 Posted September 24, 2009 Try $oIE = _IE_Example ("form") _IEFormImageClick ($oIE, "AutoIt Homepage", "alt") From helpfile, it click this: <input type='image' name='imageExample' alt='AutoIt Homepage' src='http://www.autoitscript.com/images/autoit_6_240x100.jpg'> [font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]
PinkAngel Posted September 24, 2009 Author Posted September 24, 2009 Thanks a lot. I will try that. I made a workaround though. I added a name attribute on the image and just referenced it using that name, then used _IEAction()
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