Sign in to follow this  
Followers 0
acidbat

Need help with clicking a button from a Java script.

2 posts in this topic

#1 ·  Posted (edited)

Hello everyone,

Having an issue with getting AutoIT clicking a button on a page.

The page is HTML with a bar at the bottom which is created by a JAVA code.

The Java code looks like this:

<script type="text/javascript">
<!--
//<![CDATA[     
blah.addLoadEvent(function(){
    var hotKeys = new Corp.Event.hotKeyManager();
    hotKeys.add(KEY_V, false, function() {$('save').down('button').click();});
    hotKeys.add(KEY_R, false, function() {$('reset').up('form').reset();});  
    hotKeys.add(KEY_D, false, function() {$('delete').down('button').click();});
    hotKeys.add(KEY_K, false, function() {$('reactivate').down('button').click();});
    hotKeys.add(KEY_H, false, function() {$('repeatSearch').down('button').click();});
});  
   //]]>  
-->
</script>

The button I am wanting to click is:

hotKeys.add(KEY_K, false, function() {$('reactivate').down('button').click();});

Optionally I can do a shortcut key combo (ctrl+alt+k) but I'm having little issue getting that correct as well.

Any help would be greatly appriciated.

Cheers

Edited by acidbat

Share this post


Link to post
Share on other sites



Solved this using

MouseClick("primary", 299, 47, 1)

Not really ideal but it works.

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