Jump to content

Why not activate?


Recommended Posts

Hi

i have this problem :)

i cant close this alert windows automatically!!!!!!!

I use this code:

$res = WinWait(WinGetTitle("protezione"),2)
        if($res <> 0) then
            WinActivate(WinGetTitle("protezione"))
            WinWaitActive(WinGetTitle("protezione"))
            Send("{ENTER}")
        EndIf

Posted Image

Thanks for help! :whistle:

Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key
Link to comment
Share on other sites

I change but not change the problem :whistle:

the window is invisible for autoit!!! :)

I tray with wingettitle("protezione"), nomal, notthing :)

Edited by Cyber
Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key
Link to comment
Share on other sites

Full code:

_IEFormElementSetValue ($o_login, $username)
        _IEFormElementSetValue ($o_password, $password)
        ;_IEFormImageClick($o_signin, "click")
        _IEFormSubmit ($o_form)
        _FileWriteLog(@ScriptDir & "\alL.Log","DATI Login inseriti")
        #cs
            if(WinWait(WinGetTitle("proxy"),2) <> 0) then
                WinActivate(WinGetTitle("proxy"))
                Send("{ENTER}")
            EndIf
        #ce
        
        _FileWriteLog(@ScriptDir & "\alL.Log","ATTENDO finestra protezione")
        ;#cs
        Opt("WinTextMatchMode", 2)
        
        $res = WinWait("protezione",2)
        ;MsgBox(0,"",$res)
        
        if($res <> 0) then
            _FileWriteLog(@ScriptDir & "\alL.Log","FINESTRA trovata")
            WinActivate("protezione")
            WinWaitActive("protezione")
            Send("{ENTER}")
        EndIf
        ;#ce
        _FileWriteLog(@ScriptDir & "\alL.Log","FINESTRA tolta")
        
        $ret= _IELoadWait ($oIE)

The timeout of winwait (2 sec) is not expire!!!!!

Edited by Cyber
Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key
Link to comment
Share on other sites

Sorry, I see an issue. Try this full code with changes

_IEFormElementSetValue ($o_login, $username)
        _IEFormElementSetValue ($o_password, $password)
        ;_IEFormImageClick($o_signin, "click")
        _IEFormSubmit ($o_form)
        _FileWriteLog(@ScriptDir & "\alL.Log","DATI Login inseriti")
        #cs
            if(WinWait(WinGetTitle("proxy"),2) <> 0) then
                WinActivate(WinGetTitle("proxy"))
                Send("{ENTER}")
            EndIf
        #ce
        
        _FileWriteLog(@ScriptDir & "\alL.Log","ATTENDO finestra protezione")
        ;#cs
        Opt("WinTitleMatchMode", 2)
        
        If WinWait("protezione", '', 2) Then
            $res = WinGetTitle("protezione")
            ;MsgBox(0,"",$res)
            _FileWriteLog(@ScriptDir & "\alL.Log","FINESTRA trovata")
            WinActivate($res)
            WinWaitActive($res)
            Send("{ENTER}")
        EndIf

        ;#ce
        _FileWriteLog(@ScriptDir & "\alL.Log","FINESTRA tolta")
        
        $ret= _IELoadWait ($oIE)

You probably do not need the WinGetTitle function as the Window title mode may do it ok.

Link to comment
Share on other sites

Hidden Mode, ok, so window is hiidden so will use ControlClick and guessing the button is using an accellerator.

_IEFormElementSetValue ($o_login, $username)
        _IEFormElementSetValue ($o_password, $password)
        ;_IEFormImageClick($o_signin, "click")
        _IEFormSubmit ($o_form)
        _FileWriteLog(@ScriptDir & "\alL.Log","DATI Login inseriti")
        #cs
            if(WinWait(WinGetTitle("proxy"),2) <> 0) then
                WinActivate(WinGetTitle("proxy"))
                Send("{ENTER}")
            EndIf
        #ce
        
        _FileWriteLog(@ScriptDir & "\alL.Log","ATTENDO finestra protezione")
        ;#cs
        Opt("WinTitleMatchMode", 2)
        
        If WinWait("protezione", '', 2) Then
            ;MsgBox(0,"",$res)
            _FileWriteLog(@ScriptDir & "\alL.Log","FINESTRA trovata")
            ControlClick("protezione", "", "&Si"); Add "&" for accellerator key
        EndIf

        ;#ce
        _FileWriteLog(@ScriptDir & "\alL.Log","FINESTRA tolta")
        
        $ret= _IELoadWait ($oIE)

I removed the WinGetTitle as it was not doing much. :whistle:

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...