BiBiBi Posted August 13, 2011 Share Posted August 13, 2011 Hi people, I am creating tool for a client that needs to login to a website and than submit data. On my developer comp everything is ok - ie is embedded in to GUI but on clients comp it is opening browser (IE) I did some reading ...(Ty DaleHohm and trancexx for some great solutions) but i am stuck here.No idea why it is not showing it embedded. Please help expandcollapse popup#RequireAdmin #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Version=beta #AutoIt3Wrapper_icon=icon.ico #AutoIt3Wrapper_outfile=Sitename Tool.exe #AutoIt3Wrapper_Compression=0 #AutoIt3Wrapper_UseX64=y #AutoIt3Wrapper_Res_Fileversion=0.0.0.3 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p #AutoIt3Wrapper_Tidy_Stop_OnError=n #Obfuscator_Parameters=/cs 0 /cn 0 /cv 0 /sf 1 /sv 1 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiTreeView.au3> #include <file.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <Process.au3> #include <GUIComboBox.au3> #include <GUIListBox.au3> #include <Array.au3> #include<ComboConstants.au3> #include <WinAPI.au3> #include <Date.au3> #include <GDIPlus.au3> #include <ScreenCapture.au3> #include <IE.au3> Opt("TrayIconDebug", 1) Opt("WinTitleMatchMode", 2) . . . Global $oIE Global $embGUI LoginToSIte(IniRead(@ScriptDir & "\Settings.ini", "login", "username", ""), IniRead(@ScriptDir & "\Settings.ini", "login", "password", "")) . . . Func LoginToSite($username, $password) ShowTip("In progress...", "Loging in to sitename", 1) CreateIEEmbeded() WinActivate("Embedded Web control") $lladdress = "https://sitename.me/" _IENavigate ($oIE, $lladdress) _IELoadWait ($oIE) $o_form = _IEFormGetCollection ($oIE, 0) $o_email = _IEFormElementGetObjByName ($o_form, "ctl00$txtUsername") $o_password = _IEFormElementGetObjByName ($o_form, "ctl00$txtPassword") $o_passwordmask = _IEFormElementGetObjByName ($o_form, "ctl00$txtPassword2") $o_btnLogin = _IEFormElementGetObjByName ($o_form, "ctl00$btnLogin") _IEFormElementSetValue ($o_email, $username) _IEFormElementSetValue ($o_passwordmask, "XXXXXX") _IEFormElementSetValue ($o_password, $password) _IEFormImageClick ($oIE, "Login") ShowTip("Done !", "Loging in to sitename", 1) EndFunc ;==>L Func CreateIEEmbeded() _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () $embgui = GUICreate("Embedded Web control", @DesktopWidth, @DesktopHeight,0,0 ,$WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 10,10, @DesktopWidth -20, @DesktopHeight -20) GUISetState() EndFunc Link to comment Share on other sites More sharing options...
wakillon Posted August 13, 2011 Share Posted August 13, 2011 (edited) No need to add _IELoadWait after _IENavigate ( func Wait for page load to complete before returning )and It's embedded for me.Is your client comp on IE9 ? Edited August 13, 2011 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
BiBiBi Posted August 13, 2011 Author Share Posted August 13, 2011 (edited) Me:Try this : Open IE press F-12 Find "Browser mode" ..Change it to IE8 just for testingClient:Yes it is embedded now_IENavigate ( ByRef $o_object, $s_url [, $f_wait = 1] )Didnt notice,ty for pointing out Dear admins you can mark this as SOLVED Edited August 13, 2011 by BiBiBi Link to comment Share on other sites More sharing options...
wakillon Posted August 13, 2011 Share Posted August 13, 2011 With IE9 still think the compatibility mode. Glad to help you. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
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