Sign in to follow this  
Followers 0
cjlesh

newbie mouse click question

5 posts in this topic

I'm a total newbie. I've read through the documentation and searched the forums, but I'm stuck, and would appreciate if anyone could point me in the right direction.

I'm trying to have my script click on a "button" that isn't really a button. The application I'm trying to interact with is a hybrid, with some real controls and some web controls. The button that isn't a button contains the text "Sign", and this is the only place that text exists. The button won't always be in the same place, so I can't use coordinates.

Here is the output from the window info utility when I hover over the button:

Title: PowerScribe Workstation

Class: Internet Explorer_Server

Instance: 1

However, there are numerous web control style buttons on the screen that all produce the same exact results as above, so there is nothing unique about where I want to click, except (I think) the text of the button.

How should I approach this?

Thanks in advance,

cjl

Share this post


Link to post
Share on other sites



I'm a total newbie. I've read through the documentation and searched the forums, but I'm stuck, and would appreciate if anyone could point me in the right direction.

I'm trying to have my script click on a "button" that isn't really a button. The application I'm trying to interact with is a hybrid, with some real controls and some web controls. The button that isn't a button contains the text "Sign", and this is the only place that text exists. The button won't always be in the same place, so I can't use coordinates.

Here is the output from the window info utility when I hover over the button:

Title: PowerScribe Workstation

Class: Internet Explorer_Server

Instance: 1

However, there are numerous web control style buttons on the screen that all produce the same exact results as above, so there is nothing unique about where I want to click, except (I think) the text of the button.

How should I approach this?

Thanks in advance,

cjl

Connect to the DOM of the embedded IE instance with _IEAttach() and then use the _IE* functions on it. (see help file)

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Thanks for the help, PsaltyDS.

Following your suggestions, I am able to connect to the embedded IE instance. There seem to be two frames. The larger contains the area I want to click. Using AutoIT to output the HTML, I find the following relevant portion (large amounts of irrelevant HTML omitted):

<dicta:B2 onmouseup=this.click(); id=BtDone style="OVERFLOW: hidden; WIDTH: 132px" onclick="if(isBtnDisable(this))return; BtDone_onclick();">

OK -- not quite sure how to handle this mess. Which _IE* function should I be using to activate the onclick method of the above?

Thanks again,

cjl

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Answering my own question, the following seemed to work:

#include <IE.au3>

$oIE = _IEAttach ("PowerScribe", "embedded")

$oFrame = _IEFrameGetObjByName($oIE, "bodyFrame")

$oButton = _IEGetObjById($oFrame, "BtDone")

_IEAction($oButton, "click")

Edited by cjlesh

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Thanks for the help, PsaltyDS.

Following your suggestions, I am able to connect to the embedded IE instance. There seem to be two frames. The larger contains the area I want to click. Using AutoIT to output the HTML, I find the following relevant portion (large amounts of irrelevant HTML omitted):

<dicta:B2 onmouseup=this.click(); id=BtDone style="OVERFLOW: hidden; WIDTH: 132px" onclick="if(isBtnDisable(this))return; BtDone_onclick();">

OK -- not quite sure how to handle this mess. Which _IE* function should I be using to activate the onclick method of the above?

Thanks again,

cjl

Haven't a clue what a "dicta" tag is (place holder for multiple "dictum" tags)? B)

But, it has an ID, so all is not lost. You want to get a reference to the element using _IEFormElementGetObjByName($oForm, "BtDone") and then click on that object with _IEAction($oDicta, "click").

B)

Edit:

Answering my own question, the following seemed to work:

Doh! ;)

You still owe me a cookie!

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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