PearlJamFanatic Posted October 5, 2010 Share Posted October 5, 2010 Hi, It was working for IE6 all this while. We plan to move the application to IE8 and the script no longer works. As far as i can see WinExists is failing to resognise the modal dialog's presence. Below is the script. Thanks for reading. expandcollapse popup#include <File.au3> #include <IE.au3> AutoItSetOption("WinTitleMatchMode", "2") ; set the select mode to select using substring If $CmdLine[0] < 2 Then; Arguments are not enough MsgBox(0, "Error", "Supply all the arguments, Modal Dialog title (Mandatory)") Exit EndIf _FileCreate($CmdLine[2]) $file = FileOpen($CmdLine[2], 2) ;added for debug msgbox (0,"Alert Title", $CmdLine[1]) If WinExists ($CmdLine[1]) Then MsgBox(0,"Alert",$CmdLine[1]) Else MsgBox(0,"Alert","don't exist") EndIf ;added for debug ends If Not WinWait($CmdLine[1],"",30) Then ; match the window with substring FileWrite($file, "Confirmation/Alert Pop-Up did not appear.") FileClose($file) Exit Else $title = WinGetTitle($CmdLine[1]) If Not WinActive($title) Then WinActivate($title) $oIE = _IEAttach($title, "embedded") $sHTML = _IEBodyReadHTML($oIE) FileWrite($file, $sHTML) Send("{ENTER}") If WinExists($title) Then WinClose($title) EndIf FileClose($file) EndIf Link to comment Share on other sites More sharing options...
SparkSoft Posted October 5, 2010 Share Posted October 5, 2010 (edited) Well I suppose you could just use the send command after a delay, just to make sure the dialog has popped up is the dialog important. Edited October 5, 2010 by SparkSoft [center]First Ever Script/App[/center][center]Simple Battery Meter[/center] Link to comment Share on other sites More sharing options...
PearlJamFanatic Posted October 11, 2010 Author Share Posted October 11, 2010 The title text changed from "...Web Page dialog" to "...Webpage Dialog". I guess this change will be universal and hence apply to all IE6 to IE8 migration projects. thanks for your help. 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