Sign in to follow this  
Followers 0
Cyber

Why not activate?

11 posts in this topic

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

Share this post


Link to post
Share on other sites



What Opt('WinMatchMode', ?) are you using. I hope 2 for substring title recognition.

:whistle:

Share this post


Link to post
Share on other sites

I dont modified this parameter

i use default setting

Ah!

I open IE page with IE.au3 (IE automation)


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

Share this post


Link to post
Share on other sites

Whether you are using IE or not, you are still using the Win* functions. You need to change the Opt().

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Nothing :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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

the problem is

i need hidden mode

and in hidden mode this window show under all windows :whistle:

sorry for problem :)


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

Share this post


Link to post
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:

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  
Followers 0