flyingfish Posted December 19, 2007 Share Posted December 19, 2007 Hi, I am pretty new to AutoIt, so hopefully my question would be a swept. Basically i have a tool writen in VBscript that to start IE to a specific address. However, the script lost control of IE once it started off. Right now, i need to improve this and seems AutoIt is the way to go. I want the AutoIt script to start IE and navigate to a particular address. Then IE will be controled by the java script that loaded. However, i'd like to keep eye on the IE and in case it crashes ( it crashes in a particular plugin or jscript.dll). If it crashes in jscript.dll, just restart IE. If it crashes in that plugin, the script need to copy the dump file from a particular location. Also, i want the script to be compiled into a exe and then deployed on multiple machines that don't have AutoIt installed. It seems i should use IE.au3, and it seems pretty straightforward to start IE and navigate to a particular URL i wanted. However, i am not sure what's after that, say, how to monitor the crash to happen and how to check which crash it is. Any hint or code sample would be great. thanks Derek Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 19, 2007 Share Posted December 19, 2007 One step at a time: 1. How do you know when it's crashed...? What is it you have to detect to know it's crashed? 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...
flyingfish Posted December 19, 2007 Author Share Posted December 19, 2007 I don't know exactly when it will crash. but those machines are used in our test and during a test, the browser will likely crash. the test is driven by java scripts running on IE. that java script does is to keep clicking a button on the page. the action of the button is to start and stop windows media player. when IE crashes, a window will pop up saying where it crashes. i am hoping to capture that window and read the text off it. i hope i can make the problem i am facing more clear, so if it is not, let me know with more questions, i will try better descriptions. Thanks! Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 19, 2007 Share Posted December 19, 2007 I don't know exactly when it will crash. but those machines are used in our test and during a test, the browser will likely crash. the test is driven by java scripts running on IE. that java script does is to keep clicking a button on the page. the action of the button is to start and stop windows media player. when IE crashes, a window will pop up saying where it crashes. i am hoping to capture that window and read the text off it. i hope i can make the problem i am facing more clear, so if it is not, let me know with more questions, i will try better descriptions. Thanks! Well, this is starting to sound pretty easy! If you can induce the crash, run Au3Info.exe and get the Window info (CLASS and TITLE) of the error popup. Then it's just a matter of WinExists() and maybe WinGetText(), or something nearly that easy. Opt("WinTitleMatchMode", 4) $CrashTitle = "Internet Exploder... exploded!" $CrashClass = "#32770" Do Sleep(100) Until WinExists("[CLASS:" & $CrashClass & "; TITLE:" & $CrashTitle & "]") $hCrashWin = WinGetHandle("[CLASS:" & $CrashClass & "; TITLE:" & $CrashTitle & "]") $sCrashText = WinGetText($hCrashWin) MsgBox(16, "OhMyGosh!", "It crashed: " & $sCrashText) 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...
flyingfish Posted December 19, 2007 Author Share Posted December 19, 2007 sounds like a winner. although i need to learn each command a little bit more . Will give it a shot and see how it goes. Thanks!! 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