Haveskillz Posted May 26, 2006 Share Posted May 26, 2006 ; Get the handle of the uninstall window $handle = WinGetHandle("DiabloII", "") If @error Then exit Else $i = 0 Do etc ,,, If @error Then i want it to skip to the next script is that possible ? Link to comment Share on other sites More sharing options...
4gotn1 Posted May 26, 2006 Share Posted May 26, 2006 what do you mean "skip to the next script" like an entirely new .au3 or just another section of this script? Link to comment Share on other sites More sharing options...
Haveskillz Posted May 26, 2006 Author Share Posted May 26, 2006 other section Link to comment Share on other sites More sharing options...
4gotn1 Posted May 26, 2006 Share Posted May 26, 2006 ; add this to the top Global $error ; Get the handle of the uninstall window $handle = WinGetHandle("DiabloII", "") $error = 0 If @error Then $error = 1 Else $i = 0 Do Until EndIf While $error = 1 ; INSERT HERE THE CODE ExitLoop WEnd something like that maybe? Link to comment Share on other sites More sharing options...
Haveskillz Posted May 26, 2006 Author Share Posted May 26, 2006 expandcollapse popupAutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of the uninstall window $handle = WinGetHandle("Diablo2", "") If @error Then exit Else $i = 0 Do ; MsgBox(4096, "success", "The window handle is " & $handle) ; Send some text directly to this window's edit control ;ControlClick("handle=" & $handle, "", "", "left") sleep(4500) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(40) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(100) $i = $i + 1 Until $i = 1 EndIf AutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of the uninstall window $handle = WinGetHandle("Diablo3", "") If @error Then exit Else $i = 0 Do ; MsgBox(4096, "success", "The window handle is " & $handle) ; Send some text directly to this window's edit control ;ControlClick("handle=" & $handle, "", "", "left") sleep(4500) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(40) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(100) $i = $i + 1 Until $i = 1 EndIf etcetcetcetc so that it skips to AutoItSetOption("WinTitleMatchMode", 4) of the next script.. thats what i meant Link to comment Share on other sites More sharing options...
bucky002 Posted May 26, 2006 Share Posted May 26, 2006 (edited) Re-reading postsTry posting without profanity also, because a lot of kids come here.Edit: Don't understand what you want. I'll let someone else answer your question.Even though it's worthless when you give the worst description of what you need help with. Edited May 26, 2006 by bucky002 Link to comment Share on other sites More sharing options...
4gotn1 Posted May 26, 2006 Share Posted May 26, 2006 (edited) remove the "exit" after If @error then so make it like: If @error Then Else $i = 0 Do it basically "says" if at error then, do nothing: else $i = 0 etc, since it "does nothing" it will skip to EndIf *IF* it has an error -edit- the Exit command will kill your script ( in your case, if its @error ) just FYI Edited May 26, 2006 by 4gotn1 Link to comment Share on other sites More sharing options...
Haveskillz Posted May 26, 2006 Author Share Posted May 26, 2006 that cost alot of time... i need to skip it totally :/ now it still do the ControlSend part.. and that cost alot of time isnt there a way.. that it SKIP the whole part till the next Section ? Link to comment Share on other sites More sharing options...
Haveskillz Posted May 26, 2006 Author Share Posted May 26, 2006 oke for the last time,, if you didnt understand it: expandcollapse popupAutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of the uninstall window $handle = WinGetHandle("Diablo2", "") If @error Then [b]SKIP[/b] Else $i = 0 Do ; MsgBox(4096, "success", "The window handle is " & $handle) ; Send some text directly to this window's edit control ;ControlClick("handle=" & $handle, "", "", "left") sleep(4500) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(40) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(100) $i = $i + 1 Until $i = 1 EndIf [b]AND START HERE AGAIN[/b] AutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of the uninstall window $handle = WinGetHandle("Diablo3", "") If @error Then exit Else $i = 0 Do ; MsgBox(4096, "success", "The window handle is " & $handle) ; Send some text directly to this window's edit control ;ControlClick("handle=" & $handle, "", "", "left") sleep(4500) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(40) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(100) $i = $i + 1 Until $i = 1 EndIf or something close to that... thanks :/ Link to comment Share on other sites More sharing options...
4gotn1 Posted May 26, 2006 Share Posted May 26, 2006 (edited) expandcollapse popupAutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of the uninstall window $handle = WinGetHandle("Diablo2", "") While @error =-1 Secondary_Uninstall() ExitLoop WEnd While NOT @error =-1 $i = 0 Do ; MsgBox(4096, "success", "The window handle is " & $handle) ; Send some text directly to this window's edit control ;ControlClick("handle=" & $handle, "", "", "left") Sleep(4500) ControlSend("handle=" & $handle, "", "", "{ENTER}") Sleep(40) ControlSend("handle=" & $handle, "", "", "{ENTER}") Sleep(100) $i = $i + 1 Until $i = 1 ExitLoop WEnd Func Secondary_Uninstall() AutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of the uninstall window $handle = WinGetHandle("Diablo3", "") If @error Then MsgBox(0, "Error", "Their was an error while trying to uninstall.") Else $i = 0 Do ; MsgBox(4096, "success", "The window handle is " & $handle) ; Send some text directly to this window's edit control ;ControlClick("handle=" & $handle, "", "", "left") Sleep(4500) ControlSend("handle=" & $handle, "", "", "{ENTER}") Sleep(40) ControlSend("handle=" & $handle, "", "", "{ENTER}") Sleep(100) $i = $i + 1 Until $i = 1 EndIf EndFunc; => Secondary_Uninstall() If this doesn't work, im gonna have to second V --- this --- V cuz i don't understand whats wrong Edit: Don't understand what you want. I'll let someone else answer your question. Even though it's worthless when you give the worst description of what you need help with. Edited May 26, 2006 by 4gotn1 Link to comment Share on other sites More sharing options...
Haveskillz Posted May 26, 2006 Author Share Posted May 26, 2006 (edited) Run("C:\Program Files\Diablo II\Diablo3.exe") AutoItSetOption("WinTitleMatchMode", 4) ; Get the handle of the uninstall window $handle = WinGetHandle("Diablo3", "") If @error Then exit Else $i = 0 Do ; MsgBox(4096, "success", "The window handle is " & $handle) ; Send some text directly to this window's edit control ;ControlClick("handle=" & $handle, "", "", "left") sleep(4500) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(40) ControlSend("handle=" & $handle, "", "", "{ENTER}") sleep(100) $i = $i + 1 Until $i = 1 EndIf exit but if that file dont exist i want it to skip to the next section of the script understnad me now ? Edited May 26, 2006 by Haveskillz 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