Jump to content
Sign in to follow this  
Moriba

_IEFormElementOptionSelect Not Work

Recommended Posts

#include <IE.au3>

Local $oIE = _IECreate("http://www.emui.com/plugin.php?id=unlock&mod=detail")
Local $ocheckType = _IEGetObjByName($oIE, "checkType")
Local $oproductName = _IEGetObjByName($oIE, "productName")
Local $osn = _IEGetObjByName($oIE, "sn")
Local $oimei = _IEGetObjByName($oIE, "imei")
Local $ocheckPassword = _IEGetObjByName($oIE, "checkPassword")
_IEFormElementOptionSelect($ocheckType, "智能手机", 1, "byText")
_IEFormElementOptionSelect($oproductName, "HUAWEI C8813", 1, "byText")
_IEFormElementSetValue($osn, "Z3DBYB9332212412")
_IEFormElementSetValue($oimei, "A000004336D50A")
_IEFormElementSetValue($ocheckPassword, "42244250")

uhSBadn.png

Edited by Moriba

Share this post


Link to post
Share on other sites

Here my output...

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:Test.au3" /UserParams    
+>23:51:14 Starting AutoIt3Wrapper v.2.2.0.0 SciTE v.3.4.1.0   Keyboard:00000409  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:Program Files (x86)AutoIt3SciTE   UserDir => C:UsersKyaw Swar ThwinAppDataLocalAutoIt v3SciTEAutoIt3Wrapper   SCITE_USERHOME => C:UsersKyaw Swar ThwinAppDataLocalAutoIt v3SciTE
>Running AU3Check (3.3.10.2)  from:C:Program Files (x86)AutoIt3  input:C:Test.au3
+>23:51:14 AU3Check ended.rc:0
>Running:(3.3.10.2):C:Program Files (x86)AutoIt3autoit3.exe "C:Test.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
+>23:51:15 AutoIt3.exe ended.rc:0
+>23:51:15 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 1.868
 

Share this post


Link to post
Share on other sites

Look through the html source...it's possible it may queue off a 'blur' event, which you would have to perform, manually.


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

This code work. But it is really ugly.

#include <IE.au3>

For $i = 1 To 2
    Local $oIE = _IECreate("http://www.emui.com/plugin.php?id=unlock&mod=detail", 1)
    If @extended Then
        Local $oproductName = _IEGetObjByName($oIE, "productName")
        _IEFormElementOptionSelect($oproductName, "HUAWEI C8813", 1, "byText")
    Else
        Local $ocheckType = _IEGetObjByName($oIE, "checkType")
        _IEFormElementOptionSelect($ocheckType, "智能手机", 1, "byText")
    EndIf
Next

Share this post


Link to post
Share on other sites

Isn't that really the equivalent of this?

#include <IE.au3> 
Local $url = "http://www.emui.com/plugin.php?id=unlock&mod=detail"

Local $oIE = _IECreate($url)     
Local $oproductName = _IEGetObjByName($oIE, "productName")         
_IEFormElementOptionSelect($oproductName, "HUAWEI C8813", 1, "byText")     

$oIE = _IEAttach($url, "url")
Local $ocheckType = _IEGetObjByName($oIE, "checkType")         
_IEFormElementOptionSelect($ocheckType, "智能手机", 1, "byText")

Edit: Fix foreign characters

Edited by Danp2

Share this post


Link to post
Share on other sites

This code work too. Could anyone better to improve it?

#include <IE.au3>

Local $oIE = _IECreate("http://www.emui.com/plugin.php?id=unlock&mod=detail")
Local $ocheckType = _IEGetObjByName($oIE, "checkType")
_IEFormElementOptionSelect($ocheckType, "智能手机", 1, "byText")
Local $oIE = _IECreate("http://www.emui.com/plugin.php?id=unlock&mod=detail", 1)
Local $oproductName = _IEGetObjByName($oIE, "productName")
_IEFormElementOptionSelect($oproductName, "HUAWEI C8813", 1, "byText")

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  

×
×
  • Create New...