FranKG

Select option without value

4 posts in this topic

Hello everyone!
I thank those who help me ... forgive my English!
I would like to create a script that automatically select the word PENDING. Unfortunately I can not change the web page and enter the NAME tag ...

#include <IE.au3>

 $oIE = _IECreate("http://www.site.com/ManageSingleReqs.html")
$oForm = _IEFormGetCollection($oIE)
 $oSelect = _IEFormElementGetCollection($oForm, "143")
_IEAction($oSelect, "focus")
_IEFormElementOptionSelect($oSelect, "PENDING")
<form action="#" method="POST">
<table border="1"><tbody>
<tr>
<select name="143">
<option>ACCETTATO</option>
<option>PENDING</option>
<option>COPIE INSUFFICIENTI</option>
<option>COPIE UGUALI</option>
<option>COPIE INFERIRORI</option>
<option>CONFERMA INDIRIZZO</option>
<option>CONTRATTO SCADUTO</option>
<option>NO CONVENZIONE</option>
<option>ALTRO</option>
<option>DA GESTIRE</option>
</select>
</tr>
</tbody>
</table>
<input type="submit" value="SEND">
</form>

 

Share this post


Link to post
Share on other sites



Ok i have fixed..

 

#include <IE.au3>

  $oIE = _IECreate("http://localhost/ManageSingleReqs.html", 1, 1, 0)

sleep(1000)

For $i = 142 To 144
     $oForm = _IEFormGetCollection($oIE,0)
  $oSelect = _IEFormElementGetObjByName($oForm, ""&$i&"")
 _IEAction($oSelect, "focus")
 _IEFormElementOptionSelect($oSelect, "DA GESTIRE", 1, "byText")
Next

Ok I fixed the code .. now it works but only if I open the explorer window .. otherwise I return the 1784 error.........Why?

Share this post


Link to post
Share on other sites

FIXED..

THX! 

#include <IE.au3>

$URL="http://localhost/ManageSingleReqs.html"
Local $tempIE = _IECreate($URL,1,1,1,1) ;
 Sleep(1000)
$oIE = _IECreate($URL,1,1,1,1) ;

For $i = 142 To 144
     $oForm = _IEFormGetCollection($oIE,0)
  $oSelect = _IEFormElementGetObjByName($oForm, ""&$i&"")
 _IEAction($oSelect, "focus")
 _IEFormElementOptionSelect($oSelect, "DA GESTIRE", 1, "byText")
Next

 

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