Jump to content

What the hey? (I am a blathering idiot)


Recommended Posts

; 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

AutoItSetOption("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

Re-reading posts

Try 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 by bucky002
Link to comment
Share on other sites

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 by 4gotn1
Link to comment
Share on other sites

oke for the last time,, if you didnt understand it:

AutoItSetOption("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

AutoItSetOption("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 by 4gotn1
Link to comment
Share on other sites

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 by Haveskillz
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...