Jump to content

Getting the current chrome url.


Recommended Posts

Success :-)

AutoItSetOption("WinTitleMatchMode", 2)

$handle = WinGetHandle("[CLASS:Chrome_WindowImpl_0; TITLE:Getting the current chrome url]")

If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
    ; alert the present url
    MsgBox(4096, "", ControlgetText($handle, "", "Chrome_AutocompleteEditView1" ))

    ;n redirect the browser
    ControlSetText ($handle, "", "Chrome_AutocompleteEditView1", "http://alterlife.org/")
    ControlSend ($handle, "", "Chrome_AutocompleteEditView1", "{enter}")
    MsgBox(4096, "Error", "The browser has been redirected to http://alterlife.org/.")
EndIf
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...