Jump to content

Enter when msgbox comes up?


Recommended Posts

Hi there! Im wondering if its possible to make it send directly enter to the internet explorer when an msgbox comes up?

The send("{ENTER}") not working directly there.

A try i was do, was make like this

_IENavigate ($oIE, send("{ENTER}")

But wont work.. And i have not much other ideas o.O

Link to comment
Share on other sites

Hi there! Im wondering if its possible to make it send directly enter to the internet explorer when an msgbox comes up?

The send("{ENTER}") not working directly there.

A try i was do, was make like this

_IENavigate ($oIE, send("{ENTER}")

But wont work.. And i have not much other ideas o.O

If the message box is a separate window then you just need to detect that window and send Enter to it; it will have nothing to do with _IE functions I would expect.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

If the message box is a separate window then you just need to detect that window and send Enter to it; it will have nothing to do with _IE functions I would expect.

Um what!? Also.. What i do is open new IE window and then when a popup comes up its gonna press enter

The window not goes active i think.. Maybee thats the problem. So how do i make then the IE window that popups directly active? also "ontop" (so it pressing enter on the right window)

Link to comment
Share on other sites

Assuming you will have only 1 Internet Explorer window that you want open, this will periodically check for any other Internet Explorer Windows and send ENTER to them. Seems kinda dangerous, because the window could be a popup may be something malicious, so make sure to add values to the StringRegExp line to filter out harmful stuff. Also, if you are sending ENTER to Close the popup, try using WinClose or WinKill instead of sending ENTER

AdLibEnable("_SingleIEWindow")

Func _SingleIEWindow()
    Local $IeList = ProcessList("iexplore.exe")
    If $ieList[0][0] > 1 Then
        For $i = 2 To $ieList[0][0]
            ;Adjust next line to include keywords where pressing ENTER may be bad
            If StringRegExp(WinGetText($ieList[$i][1]), "(?i)Virus|XXX|Spam") Then ContinueLoop
            ControlSend($ieList[$i][1], "", "", "{ENTER}") ;Send ENTER to 2nd & higher instances of IE
        Next
    EndIf
EndFunc
Link to comment
Share on other sites

WinGetHandle? where then?

I tried that code etc.. Didn't get it work any good :S also what i do is to navigate to a site there a dam popup comes. And then i just need delete that dam popup, by press ok or in the X, doesn't matterrrrrr.

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