ฟอรั่ม PSsix

Would you like to react to this message? Create an account in a few clicks or log in to continue.

ฟอรั่มของบล็อก http://pssix.blogspot.com


2 posters

    รัน browser อื่นๆ

    number27
    number27
    สมาชิกทั่วไป
    สมาชิกทั่วไป


    รัน browser อื่นๆ Empty
    จำนวนข้อความ : 17
    ความนิยม : 0
    เข้าร่วมเมื่อ : 14/10/2010

    รัน browser อื่นๆ Empty รัน browser อื่นๆ

    ตั้งหัวข้อ by number27 16/01/16, 02:11 pm

    ทำอย่างไรครับให้ autoit รันกับ browser อื่นได้ และทำงานได้ตามปกติ
    ผมลองให้คำสั่ง  ShellExecute("https://cannonsatoshi.com/account/fuel") เปิด Chrom ขึ้นมา
    แต่ autoit หา from หา Obj ไม่เจอครับ

    โค้ตครับ
    Code:
    #include <IE.au3>

    HotKeySet("{ESC}", "stop")
    Func stop()
    Exit
    EndFunc

    Local $oIE  = ShellExecute("C:\Program Files (x86)\Mozilla Firefox\firefox.exe", "https://cannonsatoshi.com/account/fuel")

    _IELoadWait($oIE)

    Local $oSubmit = _IEGetObjById($oIE, "login")
    _IEAction($oSubmit, "click")

    Sleep(1000)

    Local $oUserName = _IEGetObjByName($oIE, "log_email")
    Local $oPassword = _IEGetObjByName($oIE, "pass")
    _IEFormElementSetValue($oUserName, "XXXXXXXXXXX")
    _IEFormElementSetValue($oPassword, "XXXXXXXXXXX")

    Local $oInputs = _IETagNameGetCollection($oIE, "input")
    For $oInput In $oInputs
        If $oInput.classname == "btn_login" Then _IEAction($oInput, "click")
    Next

    นี้คือข้อความ error
    Code:

    --> IE.au3 T3.0-1 Error from function _IELoadWait, $_IESTATUS_InvalidDataType
    --> IE.au3 T3.0-1 Error from function _IEGetObjById, $_IESTATUS_InvalidDataType
    --> IE.au3 T3.0-1 Error from function _IEAction(click), $_IESTATUS_InvalidDataType
    --> IE.au3 T3.0-1 Error from function _IEGetObjByName, $_IESTATUS_InvalidDataType
    --> IE.au3 T3.0-1 Error from function _IEGetObjByName, $_IESTATUS_InvalidDataType
    --> IE.au3 T3.0-1 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
    --> IE.au3 T3.0-1 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
    --> IE.au3 T3.0-1 Error from function _IETagNameGetCollection, $_IESTATUS_InvalidDataType
    "C:\Users\Admin\Desktop\test.au3" (22) : ==> Variable must be of type "Object".:

    ถ้าใช้ _IECreate("https://cannonsatoshi.com/account/fuel")
    จะรันได้ตามปกติครับ



    หมายเหตุ ที่ไม่ใช้ IE เพราะหน้าเว็บเพี้ยน ไม่รองรับ IE ครับ
    Arm
    Arm
    PSsix Member Super Class III
    PSsix Member Super Class III


    PSsix Master PSsix Program Coder
    จำนวนข้อความ : 268
    ความนิยม : 54
    เข้าร่วมเมื่อ : 31/03/2011
    อายุ : 26

    รัน browser อื่นๆ Empty Re: รัน browser อื่นๆ

    ตั้งหัวข้อ by Arm 31/01/16, 05:18 pm

    library IE.au3 จะใช้ได้กับตัว Internet Explorer เท่านั้นครับ
    number27
    number27
    สมาชิกทั่วไป
    สมาชิกทั่วไป


    รัน browser อื่นๆ Empty
    จำนวนข้อความ : 17
    ความนิยม : 0
    เข้าร่วมเมื่อ : 14/10/2010

    รัน browser อื่นๆ Empty Re: รัน browser อื่นๆ

    ตั้งหัวข้อ by number27 31/01/16, 08:01 pm

    ขอบคุณครับ
    ผมลองหาข้อมูลเพิ่มเติมตอนนี้ได้ FF.au3 แล้วครับ ใช้กับ Firefox ครับ

      เวลาขณะนี้ 27/04/24, 08:47 am