cjlesh Posted November 9, 2009 Share Posted November 9, 2009 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 9, 2009 Share Posted November 9, 2009 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 WorkstationClass: Internet Explorer_ServerInstance: 1However, 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,cjlConnect 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 Link to comment Share on other sites More sharing options...
cjlesh Posted November 9, 2009 Author Share Posted November 9, 2009 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 Link to comment Share on other sites More sharing options...
cjlesh Posted November 9, 2009 Author Share Posted November 9, 2009 (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 November 9, 2009 by cjlesh Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 9, 2009 Share Posted November 9, 2009 (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,cjlHaven't a clue what a "dicta" tag is (place holder for multiple "dictum" tags)? 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"). Edit: Answering my own question, the following seemed to work:Doh! You still owe me a cookie! Edited November 9, 2009 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 Link to comment Share on other sites More sharing options...
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