Jump to content
Sign in to follow this  
Hadez

IE combobox

Recommended Posts

Hadez

Hi, currently im using a pretty noob way to select a catagory from a combobox. Does anyone know a better way to do this? It will select a catagory based on a variable name. It will basically be, If $variable says 'book' then select the option 'book' from drop down list.

$oCatagory = _IEFormElementGetObjByName($oForm, "type")
WinSetState($oHWND, "", @SW_ENABLE)
_IEAction($oCatagory, "focus")
send("e")
send("e") ;to get to the 2nd name beginning with 'e' in the list

Any help would be much appreciated :idea:

Share this post


Link to post
Share on other sites
funkey

I think you are looking for _IEFormElementOptionselect.


Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites
Hadez

$oCatagory = _IEFormElementGetObjByName($oForm, "type")
    _IEFormElementOptionselect ($oCatagory, "Book", 1, "bytext")

Works great. Cheers mate for the pointer :idea:

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  

×