jvanegmond Posted July 17, 2009 Share Posted July 17, 2009 Excellent example how to use MozRepl. Does anyone have a way to do an unattented setup of MozRepl yet or will I have to develop this myself? The documentation for English and German in this topic go to the same page. github.com/jvanegmond Link to comment Share on other sites More sharing options...
LionelG Posted July 17, 2009 Share Posted July 17, 2009 Hello Stilgar, As GerardJ asked before, do you have any plan on implementing the onchange of the javascript code ? Because I need this implementation for a project and it's very difficult to use other solutions. At the moment I use the _FFCmd() function to send the javascript code but it's not always possible. I wait a reponse of you. PS : sorry for my english, but i'm french and i'm not very good. Link to comment Share on other sites More sharing options...
Stilgar Posted July 17, 2009 Author Share Posted July 17, 2009 (edited) @trinitrotoluen: I add in one of the next versions the "OutputDebugString" via the Kernel32.lib. Shows ths this error-picture the same problem like the others before with _FFSetPrefs? @GerardJ / LionelG: Yes I would implement onclick, onchange ... - events to the _FFForm* functions. @Manadar: Thank you! The link to the english documentation is fixed now. MozRepl-Installation: The last script on this page: http://autoit.de/index.php?page=Thread&threadID=3810 checks if MozRepl is installed and if not it installs it (optional). Edited July 17, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
jvanegmond Posted July 17, 2009 Share Posted July 17, 2009 Excellent, thank you for this script. Translated some comments and variable names to English: expandcollapse popup;=============================================================================== #cs AutoIt Version: 3.2.12.1 Author: Thunder-man (Frank Michalski) Script Function: _MozRepl_Detect() Description: Checks a Firefox profile for the MozRepl extension and installes it if not available. default: $sProfile = "default" Return values: True or False V 1.0 ==> 15.09.2007 V 1.1 ==> 02.08.2008, updated by Stilgar (Thorsten Willert) changed the path-macro to @AppDataDir changed the ""-profil to "default" V1.2 ==> 03.03.2009, updated by Stilgar (Thorsten Willert) changed MozLab to MozRepl V2.0 ==> 17.03.2009, added intall-option for MozRepl by Stilgar (Thorsten Willert) #ce ;=============================================================================== ; [Example] ;~ $Result = _MozRepl_Detect() ;~ MsgBox(64, "Result", $Result) Func _MozRepl_Detect($sProfile = "default", $bInstall = True , $sXPI = "http://repo.hyperstruct.net/mozrepl/0.2/mozrepl.xpi") If $sProfile = "" Then $sProfile = "default" Local $sIni_Path = @AppDataDir & "\Mozilla\Firefox\" Local $var = IniReadSectionNames($sIni_Path & "\profiles.ini") If @error Then MsgBox(4096, "", "Error occurred, probably no Firefox INI file.") Else For $i = 1 To $var[0] Local $Ini_ = IniRead($sIni_Path & "\profiles.ini", $var[$i], "Name", "Error") If $Ini_ = $sProfile Then Local $sPath_folder = IniRead($sIni_Path & "\profiles.ini", $var[$i], "Path", "Eror") ;Profil Ordner ExitLoop EndIf Next EndIf If $bInstall Then Local $sHKLM = "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox" Local $sFFExe = RegRead($sHKLM & "\" & RegRead($sHKLM, "CurrentVersion") & "\Main", "PathToExe") Local $sCommand = StringFormat('"%s" "%s"',$sFFExe, $sXPI) EndIf If StringLeft($sPath_folder, 8) = "Profiles" Then If FileExists($sIni_Path & $sPath_folder & "\extensions\mozrepl@hyperstruct.net") Then Return 1 Else If $bInstall Then Return Run($sCommand) Return 0 EndIf Else If FileExists($sPath_folder & "\extensions\mozrepl@hyperstruct.net") Then Return 1 Else If $bInstall Then Return Run($sCommand) Return 0 EndIf EndIf EndFunc ;==>_MozRepl_Detect github.com/jvanegmond Link to comment Share on other sites More sharing options...
Stilgar Posted July 18, 2009 Author Share Posted July 18, 2009 Excellent, thank you for this script.Translated some comments and variable names to English:...Thank you! I've uploaded it to the other examples on my homepage and added a link on the first post. jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
trinitrotoluen Posted July 18, 2009 Share Posted July 18, 2009 (edited) @trinitrotoluen:I add in one of the next versions the "OutputDebugString" via the Kernel32.lib.Shows ths this error-picture the same problem like the others before with _FFSetPrefs?Yes, and still appear in new version 0.5.3.6b-1 Edited July 18, 2009 by trinitrotoluen Link to comment Share on other sites More sharing options...
trinitrotoluen Posted July 18, 2009 Share Posted July 18, 2009 And I didn't use 10053 port Link to comment Share on other sites More sharing options...
Stilgar Posted July 18, 2009 Author Share Posted July 18, 2009 Yes, and still appear in new version 0.5.3.6b-1I didn't changed anything in _FFPrefSet there, but you can use Debugview with this version now.And I didn't use 10053 portLike I said some posts before:http://www.autoitscript.com/forum/index.php?showtopic=95595&view=findpost&p=704647That's not the port number, that's the TCP-error number:MSDN:WSAECONNABORTED 10053Software caused connection abort.An established connection was aborted by the software in your host computer, possibly due to a data transmission time-out or protocol error. jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
trinitrotoluen Posted July 18, 2009 Share Posted July 18, 2009 I didn't changed anything in _FFPrefSet there, but you can use Debugview with this version now.Like I said some posts before:http://www.autoitscript.com/forum/index.php?showtopic=95595&view=findpost&p=704647That's not the port number, that's the TCP-error number:MSDN:Oh OK I forgot Link to comment Share on other sites More sharing options...
dantay9 Posted July 19, 2009 Share Posted July 19, 2009 MozRepl doesn't seem to work with the new version of firefox (I have 3.5.1). I uninstalled it and then reinstalled it. Then I looked in the tools menu and there wasn't anything there. Is anyone else experiencing this too? Link to comment Share on other sites More sharing options...
Stilgar Posted July 19, 2009 Author Share Posted July 19, 2009 (edited) MozRepl doesn't seem to work with the new version of firefox (I have 3.5.1). I uninstalled it and then reinstalled it. Then I looked in the tools menu and there wasn't anything there. Is anyone else experiencing this too?No, here it works with 3.5.1 (german version)Which version of MozRepl do you have? 1.0 is the current. Edited July 19, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
dantay9 Posted July 19, 2009 Share Posted July 19, 2009 I download from http://repo.hyperstruct.net/mozrepl/1.0/mozrepl.xpi. Maybe it has something to do with my firefox. I changed a few things with firefox to make it run a bit faster (like activating pipelining and a few other things). Link to comment Share on other sites More sharing options...
Stilgar Posted July 20, 2009 Author Share Posted July 20, 2009 I download from http://repo.hyperstruct.net/mozrepl/1.0/mozrepl.xpi. Maybe it has something to do with my firefox. I changed a few things with firefox to make it run a bit faster (like activating pipelining and a few other things).Have you tried to install MozRepl on an other FireFox-profile? jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
ValeryVal Posted July 22, 2009 Share Posted July 22, 2009 Translated _FF help into Russian in Attachment:FF_DOC_RU.ZIP The point of world view Link to comment Share on other sites More sharing options...
Stilgar Posted July 22, 2009 Author Share Posted July 22, 2009 @Valery: Many thanks for this! With your permission I'll put this on my homepage to the other translation(s). jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
ValeryVal Posted July 22, 2009 Share Posted July 22, 2009 Feel free with it, please. And I'm waiting your success with this _FF UDFs. The point of world view Link to comment Share on other sites More sharing options...
Stilgar Posted July 22, 2009 Author Share Posted July 22, 2009 Thank you!Now there it is:Russian documentation jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
ValeryVal Posted July 22, 2009 Share Posted July 22, 2009 Ahh. @Stilgar This doc is now a part from Russian AutoIt3 help. So links from subtopic "Related" have .htm file extensions. But your help file extensions are always ".php". This is reason of having i.e. on page http://russian.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFObjDelete.php the following invalid links (in Related subtopic): http://russian.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFObjGet.htm or http://russian.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFObjNew.htm The point of world view Link to comment Share on other sites More sharing options...
Stilgar Posted July 22, 2009 Author Share Posted July 22, 2009 (edited) Ahh. @StilgarThis doc is now a part from Russian AutoIt3 help. So links from subtopic "Related" have .htm file extensions. But your help file extensions are always ".php". This is reason of having i.e. on pagehttp://russian.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFObjDelete.phpthe following invalid links (in Related subtopic):http://russian.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFObjGet.htmor http://russian.documentation.ff-au3.thorsten-willert.de/ff_functions/_FFObjNew.htmOh thanks. I forget to change this. They are fixed now.They are php-files because they are only some templates using this informations:http://www.thorsten-willert.de/Themen/FFau3/Dokumentation_-_German/FF.au3_info.txtand this examples:http://thorsten-willert.de/Themen/FFau3/Beispiele/files Edited July 22, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
ValeryVal Posted July 22, 2009 Share Posted July 22, 2009 BTW. I've rewritten your example "Test of embedding FireFox". expandcollapse popup; Best use with a new "clean" FF-profile only with MozRepl installed. ; Example: Embedding a FireFox inside an AutoIt GUI ; Download and install MozRepl, only #Region Includes #include <Constants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <FF.au3> #EndRegion Includes $hGui = GUICreate ( "Embedded FireFox Test", 640, 580,(@DesktopWidth-640)/2, (@DesktopHeight-580)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUI_Button_Back = GuiCtrlCreateButton ("Back", 10, 420, 100, 30) $GUI_Button_Forward = GuiCtrlCreateButton ("Forward", 120, 420, 100, 30) $GUI_Button_Home = GuiCtrlCreateButton ("Home", 230, 420, 100, 30) $GUI_Button_Stop = GuiCtrlCreateButton ("Stop", 330, 420, 100, 30) $GUI_Button_Google = GUICtrlCreateButton ("Google", 430, 420, 100, 30) $GUI_Button_Mozilla = GUICtrlCreateButton ("Mozilla", 530, 420, 100, 30) GUISetState() _FF_CreateEmbedded($hGUI, 10, 40 , 600 , 360) _FFOpenURL("Google.com") While True $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE _FFQuit() Exit Case $msg = $GUI_Button_Google _FFOpenURL("Google.com") Case $msg = $GUI_Button_Mozilla _FFAction("About", "mozilla") Case $msg = $GUI_Button_Home _FFAction("Home", "") Case $msg = $GUI_Button_Back _FFAction("Back", "") Case $msg = $GUI_Button_Forward _FFAction("Forward", "") Case $msg = $GUI_Button_Stop _FFAction("Stop", "") EndSelect WEnd ;=============================================================================== Func _FF_CreateEmbedded($hGUI,$x, $y, $width, $height, $iTimeOut = 10000) Local $sFuncName = "_FF_CreateEmbedded" Local $OK Local $sHKLM = "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox" Local $sFFExe = RegRead($sHKLM & "\" & RegRead($sHKLM, "CurrentVersion") & "\Main", "PathToExe") WinSetOnTop($hGUI,"",1) Run($sFFExe & " about:blank", "", @SW_HIDE) Local $iTimeOutTimer = TimerInit() While 1 Sleep(500) If ProcessExists($_FF_PROC_NAME) Then ExitLoop If (TimerDiff($iTimeOutTimer) > $iTimeOut) Then SetError(__FFError($sFuncName, $_FF_ERROR_Timeout, "Browser process not exists: " & $_FF_PROC_NAME)) Return "" EndIf WEnd Do _FFConnect() $OK = @error If @error Then _FFDisConnect() Until Not $OK _FFWindowSelect() Local $hFF = _FFWindowGetHandle() WinMove($hFF, "", $x, $x, $width, $height) Do _FFAction("pm", True) Until Not @error WinMove($hFF, "", $x, $x, $width, $height) DllCall("user32.dll", "int", "SetParent", "hwnd", $hFF, "hwnd", $hGui) WinSetOnTop($hGUI,"",0) Return $hFF EndFunc It works fine under FireFox 3.5.1. But after closing AutoIt shows some error. There are some unclosed connections, I think. Now AutoIters have three nice embedded browser controls - IE, Mozilla and FireFox. The point of world view 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