Sign in to follow this  
Followers 0
airrs

_IEAction Problem

6 posts in this topic

Hi,

i'm testing some stuff for a bigger script at work.

i need to open a page enter a text and click the button (for testing i used wikipedia)

parsing the text is no problem, but the click doesent work.

here my source.

i hope someone can help me.

#include

Local $oIE = _IECreate("http://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=&fulltext=Search")
Sleep(500)
Local $oForm = _IEFormGetObjByName($oIE, "Search")
Local $oText = _IEFormElementGetObjByName($oForm, "searchText")
_IEFormElementSetValue($oText, "Test")
Local $c = _IEGetObjById($oIE, "Search")
_IEAction($c, "click")

Share this post


Link to post
Share on other sites



$oButtons = _IETagNameGetCollection ($oIE, "INPUT") ; not sure about input

For $oButton In $oButtons

If $oButton.id = "search" Then

_IEAction ($oButton, "click")

ExitLoop

EndIf

Next

Try something like this.

Share this post


Link to post
Share on other sites

Thanks for the fast answer, but it doesnt work either

Share this post


Link to post
Share on other sites

What it says? try to put in func and call it where you need. it dont works for me too when I put it directly into code.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

it just opens IE, then wikipedia, then parse the text and then the script is done and nothing happens.

I tried it with in a func, but it didnt do anything other than without it.

No errors or anything else

Edited by airrs

Share this post


Link to post
Share on other sites

Lol, i didnt checked the link but i found that "Search" is value, not id. Try using If $oButton.value = "search" Then it will work.

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  
Followers 0