PearlJamFanatic 0 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 Share this post Link to post Share on other sites
SparkSoft 0 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] Share this post Link to post Share on other sites
PearlJamFanatic 0 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. Share this post Link to post Share on other sites