Jump to content
Sign in to follow this  
diikee

how to get innertext within a class

Recommended Posts

diikee

<A class=menu onmouseover="window.status='zoom all the way out'; return true;" onmouseout="window.status=''" onclick="return zoomOutMax();" href="">NO ZOOM</A>

$onzs = _IETagnameGetCollection($oIE, "a")

For $onz in $onzs

If String($onz.className) = "menu" Then

if String(_IEPropertyGet($onz.className, "innerText")) = "NO ZOOM" Then

_IEAction($onz, "focus")

Sleep(500)

_IEAction($onz, "focus")

$iScreenX = _IEPropertyGet($onz, "screenx")

$iScreenY = _IEPropertyGet($onz, "screeny")

$iWidth = _IEPropertyGet($onz, "width")

$iHeight = _IEPropertyGet($onz, "height")

MouseMove($iScreenX + $iWidth/2, $iScreenY + $iHeight/2)

Sleep(500)

MouseClick("left")

Sleep(500)

MouseDown("left")

MouseUp("left")

ExitLoop

EndIf

EndIf

Next

it's complaining about my innerText reference

ERROR: _IEPropertyGet() called with Const or expression on ByRef-param(s).

if String(_IEPropertyGet($onz.className, "innerText")

Share this post


Link to post
Share on other sites
diikee

Solved:

changed the $onz.className to ($onz, "innerText")

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  

×