Sign in to follow this  
Followers 0
arunachandu

Need help in selecting an option from combobox

4 posts in this topic

HI,

Looks silly to ask this question. But i am new to autoit.

I am selecting an option from the select box.

This is what i gave.

ControlCommand($oIE,"","[Name:file_menu]","SelectString", 'CSV')

where $oIE is the page opens in IE with the desired url

Can some one help me in this?

Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

arunachandu,

It appears your trying to automate a Menu selection in Internet Explorer Application. If this is correct, try WinMenuSelect() instead.

If your trying to automate a combo box from inside a web page, you may want to read up on the User Defined Library IE.au3 where you will find many useful functions related to automating Internet Explorer.

Realm.

Edit: Typos

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks the suggestion.

i have coded

$oFormSelect = _IEFormGetObjByName ($oIE, "file_form")

_IEFormElementCheckBoxSelect($oFormSelect,"csv","",1,"byValue")

but this is not working.

Can you correct where am i going wrong?

i was getting this error:

IE.au3 V2.4-0 Warning from function _IEFormGetObjByName, $_IEStatus_NoMatch

--> IE.au3 V2.4-0 Error from function _IEFormElementCheckboxSelect, $_IEStatus_InvalidDataType

Edited by arunachandu

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

If you take a moment to read the helpfile, those warnings and errors are self explained.

First Lets breakdown the warning...

IE.au3 V2.4-0 Warning from function_IEFormGetObjByName, $IEStatus_NoMatch.

It says that _IEFormGetObjByName is warning you with this flag -->$IEStatus_NoMatch

Opening the helpfile, look at the flags that will be return when this function fails.

7 ($_IEStatus_NoMatch) = No Match

This suggests That form name "file_form" is not found in the source code. This is a warning ultimately meaning its not script breaking, however anything that calls upon the reference of $oFormSelect is likely to fail or break. I am more than certain that since this function failed, that the failure of the next following function failed since it is passed the object reference that was supposed to be assigned to $oFormSelect. I would suggest reading the source code of the web page your attempting to automate, from an Internet Explorer window, and looking for the correct form ID.

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

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