Jump to content
Sign in to follow this  
tradertt

_IEPropertyGet help needed

Recommended Posts

tradertt

#include <IE.au3>

Opt("WinWaitDelay", 100)
Opt("WinTitleMatchMode", 4)
Opt("WinDetectHiddenText", 1)
Opt("MouseCoordMode", 0)

WinWait("Microsoft Excel", "")
If Not WinActive("Microsoft Excel", "") Then _
        WinActivate("Microsoft Excel", "")
WinWaitActive("Microsoft Excel", "")
Send("{CTRLDOWN}c{CTRLUP}")

$sURL = ClipGet()
$oIE = _IECreate($sURL, 0, 1, 0)
$hwnd = _IEPropertyGet($oIE, "hwnd")
Sleep(2000)
WinSetState($hwnd, "", @SW_MAXIMIZE)
WinActivate($hwnd, "")
_IELoadWait($oIE)
Sleep(2000)

If _IEPropertyGet ($oIE, "locationurl") = http://www.abc.com/verify? Then
    WinClose ($hwnd, "" )
    Else

_IELinkClickByText($oIE, "Download")

I want the portion of

If _IEPropertyGet ($oIE, "locationurl") = http://www.abc.com/verify? Then

WinClose ($hwnd, "" )

Else

_IELinkClickByText($oIE, "Download")

If it contains that part of the URL - there are additional text behind http://www.abc.com/verify?ajsdiofha

so if it contains http://www.abc.com/verify? I want it to close the window or else it will just move on to the next part of the script.

How can I do that?

Share this post


Link to post
Share on other sites
i542

You want search inside string if is some other string inside it?

Use StringInStr command to search is some word/address inside it.

Happy programming!

i542


I can do signature me.

Share this post


Link to post
Share on other sites
i542

:whistle: Here it is:

If StringInStr("Web address","Part you want found") = 0 Then
;what if string 2 is not in string 1
Else
;what if string 2 is in string 2
EndIf

I am sorry, Joey is on TV now...

i542


I can do signature me.

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  

×