diikee Posted June 16, 2008 Share Posted June 16, 2008 <TD class=startsub>quality<script>writeQuality();</SCRIPT><SELECT onchange=setQuality(this); name=quality><OPTION value=high>medium</OPTION> <OPTION value=medium selected>high</OPTION> <OPTION value=low>fine</OPTION> <OPTION value=xlow>superfine</OPTION></SELECT> </TD>$oForm = _IEFormGetObjByName ($oIE, "myform") $oInputs = _IETagNameGetCollection ($oIE, "[color="#000080"]select[/color]") For $oInput In $oInputs $oQuery = _IEFormElementGetObjByName ($oInput, "OPTION") MsgBox(0, "Form Input Type", "Form: " & $oInput.$oQuery.value & " Type: " & $oInput.$oQuery.value.innerText) NextMsgBox(0, "Form Input Type", "Form: " & $oInput.$oQuery.valueMsgBox(0, "Form Input Type", "Form: " & $oInput.$oQuery^ ERRORI want to get the options available for selection, save them to a variable and reuse them as a comparison point to whether my _IEFormElementOptionselect is working.what am I doing wrong?? Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 16, 2008 Share Posted June 16, 2008 <TD class=startsub>quality <script>writeQuality();</SCRIPT> <SELECT onchange=setQuality(this); name=quality> <OPTION value=high>medium</OPTION> <OPTION value=medium selected>high</OPTION> <OPTION value=low>fine</OPTION> <OPTION value=xlow>superfine</OPTION> </SELECT> </TD> $oForm = _IEFormGetObjByName ($oIE, "myform") $oInputs = _IETagNameGetCollection ($oIE, "[color="#000080"]select[/color]") For $oInput In $oInputs $oQuery = _IEFormElementGetObjByName ($oInput, "OPTION") MsgBox(0, "Form Input Type", "Form: " & $oInput.$oQuery.value & " Type: " & $oInput.$oQuery.value.innerText) Next MsgBox(0, "Form Input Type", "Form: " & $oInput.$oQuery.value MsgBox(0, "Form Input Type", "Form: " & $oInput.$oQuery^ ERROR I want to get the options available for selection, save them to a variable and reuse them as a comparison point to whether my _IEFormElementOptionselect is working. what am I doing wrong?? Just use $oQuery.value -- not $oInput.$oQuery.value. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
diikee Posted June 16, 2008 Author Share Posted June 16, 2008 (edited) $oForm = _IEFormGetObjByName ($oIE, "myform")$oInputs = _IETagNameGetCollection ($oIE, "select")For $oInput In $oInputs If ($oInput.name) = "quality" then $opt = _IETagNameGetCollection($oInput, "OPTION") For $op in $opt MsgBox(0, "Selection Values", "Name: " & $oInput.name & " Type: " & $op.innerText) Next ExitLoop EndIfNextI was able to get the values using method aboveHow do I save this values to an array so that I can use them as selection items?? Edited June 16, 2008 by diikee Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 16, 2008 Share Posted June 16, 2008 $oForm = _IEFormGetObjByName ($oIE, "myform") $oInputs = _IETagNameGetCollection ($oIE, "select") For $oInput In $oInputs If ($oInput.name) = "quality" then $opt = _IETagNameGetCollection($oInput, "OPTION") For $op in $opt MsgBox(0, "Selection Values", "Name: " & $oInput.name & " Type: " & $op.innerText) Next ExitLoop EndIf Next I was able to get the values using method above How do I save this values to an array so that I can use them as selection items?? If what you want is .name and .innertext then you might do this: Global $avOpt[1][2] $oForm = _IEFormGetObjByName($oIE, "myform") $oInputs = _IETagNameGetCollection($oIE, "select") For $oInput In $oInputs If ($oInput.name) = "quality" Then $opt = _IETagNameGetCollection($oInput, "OPTION") ReDim $avOpt[@extended][2] $n = 0 For $op In $opt $avOpt[$n][0] = $oInput.name $avOpt[$n][1] = $op.innerText $n += 1 Next ExitLoop EndIf Next Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now