Jump to content

Getting the title of a changing title?


AzKay
 Share

Recommended Posts

Just say ive got this:

$oIE = _IECreate("http://google.com")
AdlibEnable("_WinExists")

While 1
_IENavigate($oIE, $oRandomLink) ;Would end up having the $oIE window having a new title each time
Sleep(100)
WEnd

Func _WinExists()
If Not WinExists($oTitle) Then
    MsgBox(0, "Error", "Oooops, IE window has been closed. Exiting...")
    Exit
EndIf
EndFunc
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

Odd, Doesnt seem to work.

Func _WinExists()
    $oTitle_Source = _IEBodyReadHTML($oIE)
    $oTitle = _StringBetween($oTitle_Source, "<title>", "</title>")
If Not WinExists($oTitle) Then
    MsgBox(0, "Error", "Oooops, IE window has been closed. Exiting...")
    Exit
EndIf
EndFunc
oÝ÷ Ù+kxzÜzv®¶­s`¤gVæ2õ7G&æt&WGvVVâb33c·2Âb33c¶g&öÒÂb33c·Fò¢b33c·Ò7G&ætå7G"b33c·2Âb33c¶g&öÒ²7G&ætÆVâb33c¶g&öÒ¢b33c·Ò7G&ætå7G"7G&æuG&ÔÆVgBb33c·2Âb33c·Âb33c·Fò¥&WGW&â7G&ætÖBb33c·2Âb33c·Âb33c·¤VæDgVæ0
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

If _IECreate returns a title, very much so, yes.

Didnt work, So, I looked closely, And noticed, every time it make the window, the window, is, for a second, called "Microsoft internet explorer" So, I set the "wait" time on the IECreate to instant, and made the wingethandle look for "microsoft internet explorer", Then, all went well. Thanks.
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

You're welcome, AzKay. :lmao:

^^

Oh, and I realized why the _IEBodyReadHtml didnt work, I read through it again, and noticed _IE"BODY"ReadHtml(). So, It wouldnt of read the title. =P

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
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...