Sign in to follow this  
Followers 0
CowboyBob

Accessing onclick Method

4 posts in this topic

I am very new to AutoIT and already love it. Does anyone know if it is possible to programatically access the onclick method using the IE include library or is there some other way to do it?

I am trying to click on the object below, it is located inside a <span> tag.

<span id="ToolSearch" title="Click to Expand" class="Label_Font_Menu" onclick="DoSomeStuffHere();">Search</span>

Share this post


Link to post
Share on other sites



I think this should work.

#include <IE.au3>

$var=_IEGetObjById($ie, "ToolSearch") ;$ie is your ie instance
_IEAction($var, "click")

Share this post


Link to post
Share on other sites

Awsome! That works! Is there any documentation on the IE library some place? Thanks for your quick reply.

Share this post


Link to post
Share on other sites

Almost everything you will ever need is documented in the helpfiles. You can just hit F1 in autoit when your cursor is next to a function and you will get everything you need to know.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0