heman6888 Posted March 18, 2008 Share Posted March 18, 2008 Hi,I am trying to click a button on a web page dialogbox.1. How can I do that?2. When I use '$oIE = _IEAttach ("Select Object -- Web Page Dialog","Embedded")', I got following error message.C:\Program Files\AutoIt3\beta\Include\IE.au3 (4185) : ==> The requested action with this object has failed.:Return $oIE.document.parentwindowReturn $oIE.Document^ ERRORPlease find below information of the window for your reference.>>>> Window <<<< Title: Select Object -- Web Page Dialog Class: Internet Explorer_TridentDlgFrame Position: 522, 216 Size: 1000, 770 Style: 0x96CC0000 ExStyle: 0x00000101 Handle: 0x00240B3C >>>> Control <<<< Class: Internet Explorer_Server Instance: 1 ClassnameNN: Internet Explorer_Server1 ID: Text: Position: 0, 0 Size: 992, 736 ControlClick Coords: 348, 204 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x021F0D7A >>>> Mouse <<<< Position: 874, 450 Cursor ID: 2 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<<I would be thankful for any help... Link to comment Share on other sites More sharing options...
fielmann Posted March 18, 2008 Share Posted March 18, 2008 Quest1) $oAction = _IEAction ($oName_of_button, "click") Quest2) #include <IE.au3> $oIE = _IEAttach ("AutoIt") MsgBox(0, "The URL", _IEPropertyGet ($oIE, "locationurl")) Hope that helps! Link to comment Share on other sites More sharing options...
DaleHohm Posted March 18, 2008 Share Posted March 18, 2008 Hi, I am trying to click a button on a web page dialogbox. 1. How can I do that? 2. When I use '$oIE = _IEAttach ("Select Object -- Web Page Dialog","Embedded")', I got following error message. C:\Program Files\AutoIt3\beta\Include\IE.au3 (4185) : ==> The requested action with this object has failed.: Return $oIE.document.parentwindow Return $oIE.Document^ ERROR Please find below information of the window for your reference. >>>> Window <<<< Title: Select Object -- Web Page Dialog Class: Internet Explorer_TridentDlgFrame Position: 522, 216 Size: 1000, 770 Style: 0x96CC0000 ExStyle: 0x00000101 Handle: 0x00240B3C >>>> Control <<<< Class: Internet Explorer_Server Instance: 1 ClassnameNN: Internet Explorer_Server1 ID: Text: Position: 0, 0 Size: 992, 736 ControlClick Coords: 348, 204 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x021F0D7A >>>> Mouse <<<< Position: 874, 450 Cursor ID: 2 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< I would be thankful for any help...The information from the Info tool really is not helpful. Please describe the window you are trying to connect to in more detail, please include ALL of the text output to the SciTe console, add this near the top of your code: _IEErrorHandlerEnable() and please provide a reprodcer that would allow me to see the same behavior if possible. Thanks, Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
heman6888 Posted March 19, 2008 Author Share Posted March 19, 2008 (edited) The information from the Info tool really is not helpful. Please describe the window you are trying to connect to in more detail, please include ALL of the text output to the SciTe console, add this near the top of your code: _IEErrorHandlerEnable() and please provide a reprodcer that would allow me to see the same behavior if possible. Thanks, Dale Hi Dale, There is no _IEErrorHandlerEnable() in the latest version. The window is a pup-up window when I click a button in the main page. The main page is a HTTPS connection. Below is the screen of the window that I am working for: Here is all the text output in SciTe console: >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "Z:\AutoIT\sample\test1.AU3" /autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams +>10:38:02 Starting AutoIt3Wrapper v.1.10.1.6 Environment(Language:0409 Keyboard:00000804 OS:WIN_XP/Service Pack 2 CPU:X86) >Running AU3Check (1.54.13.0) from:C:\Program Files\AutoIt3\beta +>10:38:02 AU3Check ended.rc:0 >Running:(3.2.11.1):C:\Program Files\AutoIt3\beta\autoit3.exe "Z:\AutoIT\sample\test1.AU3" C:\Program Files\AutoIt3\beta\Include\IE.au3 (4185) : ==> The requested action with this object has failed.: Return $oIE.document.parentwindow Return $oIE.Document^ ERROR ->10:38:03 AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 2.679 Hope you can help... Thanks, Heman Edited March 19, 2008 by heman6888 Link to comment Share on other sites More sharing options...
DaleHohm Posted March 19, 2008 Share Posted March 19, 2008 Ooops. Sorry, _IEErrorHandlerRegister() Can you provide a reproducer? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
heman6888 Posted March 19, 2008 Author Share Posted March 19, 2008 Dale, Below is the text output in SciTe console with _IEErrorHandlerRegister(): >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /beta /ErrorStdOut /in "Z:\AutoIT\sample\test1.AU3" /autoit3dir "C:\Program Files\AutoIt3\beta" /UserParams +>15:13:57 Starting AutoIt3Wrapper v.1.10.1.6 Environment(Language:0409 Keyboard:00000804 OS:WIN_XP/Service Pack 2 CPU:X86) >Running AU3Check (1.54.13.0) from:C:\Program Files\AutoIt3\beta +>15:13:57 AU3Check ended.rc:0 >Running:(3.2.11.1):C:\Program Files\AutoIt3\beta\autoit3.exe "Z:\AutoIT\sample\test1.AU3" --> COM Error Encountered in test1.AU3 ----> $IEComErrorScriptline = 4185 ----> $IEComErrorNumberHex = 80020009 ----> $IEComErrorNumber = -2147352567 ----> $IEComErrorWinDescription = Access is denied. ----> $IEComErrorDescription = Access is denied. ----> $IEComErrorSource = ----> $IEComErrorHelpFile = C:\WINDOWS\system32\mshtml.hlp ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 --> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IEPropertySet, $_IEStatus_InvalidDataType +>15:13:58 AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.924 Link to comment Share on other sites More sharing options...
DaleHohm Posted March 19, 2008 Share Posted March 19, 2008 OK, the key is the "Access is denied." This is typically caused by trying to script accross frames in different domains. I have also seen this occur if the browser or frame is in the middle of an update (or in an Ajax application that is doing dynamic document updates). You still have shred no code so there is little else I can help you with. Check for the frames issue, try adding _IELoadWait to insure the document is quiescent, narrow down the source of the trouble. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
heman6888 Posted March 20, 2008 Author Share Posted March 20, 2008 Dale, How can I get the code of the pup-up window? Link to comment Share on other sites More sharing options...
DaleHohm Posted March 20, 2008 Share Posted March 20, 2008 Hard to say, but perhaps _IEAttach or _IEAttach with embedded (make sure to use autoit 3.2.11.x) Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Squirrely1 Posted March 20, 2008 Share Posted March 20, 2008 @heman6888 - Have you tried this code for clicking on said button in said dialog: ControlClick("Select Object -- Web Page Dialog", "", "[CLASSNN:Internet Explorer_Server1]") Das Häschen benutzt Radar 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