Sign in to follow this  
Followers 0
Blackstar

Get list of item names from html's combo box

7 posts in this topic

Hello,

How do I harvest item names in a combo box via IE.au3?

I can select folder name in email web page if I know the name beforehand but what are the list of folder's names that I don't know are existed in that combo box?

CODE

$oSelect = _IEGetObjByName($oIE, "folder_move_dest1")

_IEFormElementOptionselect($oSelect, "Trash")

$oGo = _IEGetObjByName($oIE, "move1")

$oGo.click

Thanks.

Share this post


Link to post
Share on other sites



You may have to parse the source to get all the options.

Share this post


Link to post
Share on other sites

Hello,

How do I harvest item names in a combo box via IE.au3?

I can select folder name in email web page if I know the name beforehand but what are the list of folder's names that I don't know are existed in that combo box?

CODE

$oSelect = _IEGetObjByName($oIE, "folder_move_dest1")

_IEFormElementOptionselect($oSelect, "Trash")

$oGo = _IEGetObjByName($oIE, "move1")

$oGo.click

Thanks.
A Select object has an options collection... once you have that you can loop through the items...

$oSelect = _IEGetObjByName($oIE, "folder_move_dest1")
$oOptions = $oSelect.options
For $oOption in $oOptions
    ConsoleWrite( _
        "Text: " & $oOption.text & _
        "Value: " & $oOption.value & _
        "Selected: " & $oOption.selected & _
        "defaultSelected: " & $oOption.defaultselected _
    )
Next

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

A Select object has an options collection... once you have that you can loop through the items...

$oSelect = _IEGetObjByName($oIE, "folder_move_dest1")
$oOptions = $oSelect.options
For $oOption in $oOptions
    ConsoleWrite( _
        "Text: " & $oOption.text & _
        "Value: " & $oOption.value & _
        "Selected: " & $oOption.selected & _
        "defaultSelected: " & $oOption.defaultselected _
    )
Next

Dale

=-o that is pretty damn sexxy that would of come in handy a while back

Share this post


Link to post
Share on other sites

I need to find a reference and application guide to use this IE library. The AutoIT Help File is great, but I'm new to IE functionality.

Share this post


Link to post
Share on other sites

I need to find a reference and application guide to use this IE library. The AutoIT Help File is great, but I'm new to IE functionality.

Yeah, that would be nice wouldn't it... sounds like a full-time job for a while, or a good community project. For now there are application examples scattered throughout the forums and there are any number of VBScript examples on the web or in MSDN that show what can be done and readlily translated to AutoIt.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Great thanks Dale.

Excactly what I wanted.

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