Jump to content

Need help here.. (Autoit with IE)


s3nsei
 Share

Recommended Posts

Good day all,

I'm newbie.. Please kindly help me here..

I usually using 'Autoit Window Info' for targetting button,inputbox,etc

But i found it doesn't work with 'web based' application.

My question is how to use Autoit with Internet Explorer?

The main idea is i'm trying to 'click a button', 'fill an inputbox', 'read'

Any reference / sample script is much appreciated.

Thank you so much for your attention, have a nice day ;)

Link to comment
Share on other sites

Please help me again with this noob questions :)

===Script===

#include <IE.au3>

Opt("WinTitleMatchMode",2)

$Web = "SCAN"

WinActivate($Web)

$oIE = _IEAttach($Web)

$oSearch = _IEFormElementGetObjByName($Web, "Search")

$oSearch.click

===END===

I'm trying to target IE window with title 'SCAN'

The IE window has a button search which i'm trying to click it,

Please tell me how to fix the above script.

Thank you in advance ;)

Link to comment
Share on other sites

Many thanks for your info, i'll try that.

Sorry for noob questions.. but I wonder where they got this 'f1' or 'f' ?

$o_form = _IEFormGetObjByName ($oIE, "f1")

$o_form = _IEFormGetObjByName ($oIE, "f")

If you are referring to the form instance, the correct syntax would be
$o_form = _IEFormGetObjByName ($oIE, "f", 1)
which would be the second instance...0 is the first instance. I'm not sure if that answers your question, though?
Link to comment
Share on other sites

That's not i asked, here's another sample i confused :

===Script===

$oIE = _IECreate()

_IENavigate($oIE, "http://autoitscript.com")

_IEClickLinkByText($oIE, "forum")

_IEClickLinkByText($oIE, "v3 Support")

_IEClickImg($oIE, "Start new topic", "alt")

$o_form = _IEFormGetObjByName($oIE, "REPLIER")

$o_title = _IEFormElementGetObjByName($o_form, "TopicTitle")

$o_desc = _IEFormElementGetObjByName($o_form, "TopicDesc")

$o_message = _IEFormElementGetObjByName($o_form, "Post")

===END===

How to determine those "REPLIER" / "TopicTitle" / "TopicDesc" / "Post" ?

If is random?

Thank you for your attention.

Link to comment
Share on other sites

From the help file _IEFormGetCollection

; *******************************************************
; Example 2 - Get a reference to the collection of forms on a page,
;               and then loop through them displaying information for each
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate("http://www.autoitscript.com")
$oForms = _IEFormGetCollection($oIE)
MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")
For $oForm In $oForms
    MsgBox(0, "Form Info", $oForm.name)
Next
This scrolls through all the forms available on the page...you'll have to delve from there since I have no idea what type of forms you have

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