Jump to content

Recommended Posts

Posted

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")
Posted

$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.

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...