Iose Posted February 15, 2024 Posted February 15, 2024 Hello, I'm creating a browser where I'm trying to send some parameters via POST without success. expandcollapse popup#include "IE_EmbeddedVersioning.au3" #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <array.au3> #include <WinAPISys.au3> #include <WindowsConstants.au3> #include "FunSkin.au3" Local $hProcMsgBox = DllCallbackRegister("CbtHookProcMsgBox", "int", "int;int;int") Local $TIDMsgBox = _WinAPI_GetCurrentThreadId() Local $hHookMsgBox = _WinAPI_SetWindowsHookEx($WH_CBT, DllCallbackGetPtr($hProcMsgBox), 0, $TIDMsgBox) _FunSkin_Example(@ScriptDir & "/SkinA") Func _FunSkin_Example($SkinPath) If $SkinPath <> "" Then _FunSkin_Start($SkinPath) EndIf _IE_EmbeddedSetBrowserEmulation() Local $oIE = _IECreateEmbedded() Local $hGUI = GUICreate("Browser", @DesktopWidth - 20, @DesktopHeight - 90, -1) Local $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, @DesktopWidth - 20, @DesktopHeight - 85) GUISetState() ; Show GUI Local $url = "http://localhost/Autoit/index-POST.php" _IENavigate($oIE, $url) _IELoadWait($oIE) Local $p1 = "value1" Local $p2 = "value2" ; Set param _IEFormElementSetValue(_IEFormElementGetObjByName($oIE, "param1"), $p1) _IEFormElementSetValue(_IEFormElementGetObjByName($oIE, "param2"), $p2) ; Send form _IENavigate($oIE, $url, "", "POST", "param1=" & $p1 & "¶m2=" & $p2) _IELoadWait($oIE) GUISetState() If $SkinPath <> "" Then _FunSkin_Stop() EndIf GUIDelete($hGUI) EndFunc ;==>_FunSkin_Example My PHP page is not receiving the sent parameters. Can someone help me understand? First of all, is it possible to send POST parameters? Error: Incorrect number of parameters in function call Thanks
Moderators SmOke_N Posted February 15, 2024 Moderators Posted February 15, 2024 This is an example script forum, you're looking for general help and support... moving Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Andreik Posted February 15, 2024 Posted February 15, 2024 And here are the details of Navigate2 method.
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