ทำอย่างไรครับให้ autoit รันกับ browser อื่นได้ และทำงานได้ตามปกติ
ผมลองให้คำสั่ง ShellExecute("https://cannonsatoshi.com/account/fuel") เปิด Chrom ขึ้นมา
แต่ autoit หา from หา Obj ไม่เจอครับ
โค้ตครับ
นี้คือข้อความ error
ถ้าใช้ _IECreate("https://cannonsatoshi.com/account/fuel")
จะรันได้ตามปกติครับ
หมายเหตุ ที่ไม่ใช้ IE เพราะหน้าเว็บเพี้ยน ไม่รองรับ IE ครับ
ผมลองให้คำสั่ง 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 ครับ