Jump to content
Sign in to follow this  
Docfxit

Illegal text at the end of statement

Recommended Posts

Docfxit

 

I'm getting this error in AutoIt ver. 3.3.12.0

"C:\Dnload\DriverMaxUninstallStripped.au3"(63,25) : error: syntax error
Func IsVisible($handle) drivermax

 

This is my code:

_AU3RecordSetup()
#include <array.au3>
#include <WinAPI.au3>

Run('C:\Programs\Total Uninstall 6\Tu.exe')
$programTitle = "Total Uninstall Professional Edition"
While Not ControlCommand($programTitle, 'Installed programs', "TAdvGlowButton20", "IsEnabled", "") ;Installed programs Button
    Sleep(100)
    ControlFocus($programTitle, 'Installed programs', 'TAdvGlowButton20')
WEnd
ControlClick($programTitle, 'Installed programs', 'TAdvGlowButton20')

Send("drivermax{SPACE}")

$var = WinList()
For $i = 1 To $var[0][0]
    ; Only display visble windows that have a title
    If $var[$i][0] <> "" And IsVisible($var[$i][1]) Then
        ;       MsgBox(0, "Details", "Title=" & $var[$i][0] & @LF & "Handle=" & $var[$i][1] & @CRLF & "ProcessId: " & WinGetProcess($var[$i][0]))
    EndIf
Next

$title = WinGetTitle($programTitle, "")
WinActivate($title, "")
$text = WinGetText("", "")
$text = StringStripCR($text)
$TextLine = StringSplit($text, @LF)
Send("{SHIFTDOWN}{TAB}{SHIFTUP}{down}")

While Not ControlCommand($programTitle, 'Uninstall', "TAdvGlowButton8", "IsEnabled", "") ;Installed programs Button
    Sleep(100)
    ControlFocus($programTitle, 'Uninstall', 'TAdvGlowButton8')
WEnd
ControlClick($programTitle, 'Uninstall', 'TAdvGlowButton8')

_WinWaitActivate("classname=TdlgUninstall", "")
Send("{ENTER}")
_WinWaitActivate("DriverMax Uninstall", "Are you sure you wan")
Send("y")
_WinWaitActivate("Uninstallation survey - DriverMax - Mozilla Firefox", "")
If ProcessExists("FireFox.exe") Then
    ProcessClose("FireFox.exe")
EndIf
_WinWaitActivate("DriverMax Uninstall", "")
Send("{ENTER}")
_WinWaitActivate("classname=TdlgUninstall", "")
Send("{ENTER}")

Run('c:\Batch\CleanTemp.bat')
WinWait("C:\Windows\System32\CMD.exe", "")
MsgBox(42, "", "Wait for CleanTemp to end")
Run('c:\Batch\Re-Start.bat')

Func _WinWaitActivate($title, $text, $timeout = 0, $scriptLineNo = 0)
    If $scriptLineNo <> "Skip" Then
        MsgBox(0, "", "Current Script Line# = " & $scriptLineNo & @CRLF & "Title = " & $title & @CRLF & "Text = " & $text)
    EndIf
    WinWait($title, $text, $timeout)
    If Not WinActive($title, $text) Then WinActivate($title, $text)
    WinWaitActive($title, $text, $timeout)
EndFunc   ;==>_WinWaitActivate

Func IsVisible($handle) drivermax
    If BitAND(WinGetState($handle), 8) Then
        Return 1
    Else
        Return 0
    EndIf
EndFunc   ;==>IsVisible

Func _AU3RecordSetup()
    Opt('WinWaitDelay', 500)
    Opt('WinDetectHiddenText', 1)
    Opt('MouseCoordMode', 0)
    Opt("WinTitleMatchMode", 4)
    Opt("TrayIconDebug", 1) ;0-off
    ; Set so that tray displays current line number
EndFunc   ;==>_AU3RecordSetup

Thank you,

Docfxit

Share this post


Link to post
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
Sign in to follow this  

×