trinitrotoluen Posted March 17, 2009 Share Posted March 17, 2009 (edited) Hi, Yes, same error on the same page. I have 2 question : 1. Can I load the page but don't let the browser appear anything (picture,text,banner...) ? I think it will improve the speed for unload unimportant page. 2.What's difference between _FFaction("find") and _FFSearch ? thx ! Edit : Can you give me some documents for content.find(), many thanks ! Edited March 17, 2009 by trinitrotoluen Link to comment Share on other sites More sharing options...
Stilgar Posted March 17, 2009 Share Posted March 17, 2009 Hi, Yes, same error on the same page. I have 2 question : 1. Can I load the page but don't let the browser appear anything (picture,text,banner...) ? I think it will improve the speed for unload unimportant page. 2.What's difference between _FFaction("find") and _FFSearch ? thx ! Edit : Can you give me some documents for content.find(), many thanks !- Can you tell me page, please? I tried yesterday _FFSearch on different pages, thousands of times and I never had an error like that and the search results where never wrong ... 1. You can disable the picture loading but not the whole page rendering: ; Block images OFF: _FFPrefSet($Socket,"permissions.default.image",1) ; Block images ON: _FFPrefSet($Socket,"permissions.default.image",2) 2. Have you tried it? _FFaction("find") only opens the search dialog. 3. MDC - find() jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
trinitrotoluen Posted March 17, 2009 Share Posted March 17, 2009 - Can you tell me page, please? I tried yesterday _FFSearch on different pages, thousands of times and I never had an error like that and the search results where never wrong ... 1. You can disable the picture loading but not the whole page rendering: ; Block images OFF: _FFPrefSet($Socket,"permissions.default.image",1) ; Block images ON: _FFPrefSet($Socket,"permissions.default.image",2) 2. Have you tried it? _FFaction("find") only opens the search dialog. 3. MDC - find() Thank you for MDC - find() link. I don't remeber the page, but I'm sure it in my bookmark, I will try again and send you soon. Link to comment Share on other sites More sharing options...
longnhi Posted March 22, 2009 Share Posted March 22, 2009 Hi, @Stilgar: Can you review _FFFormOptionselect function. I think it doesn't work. I used ur example but it not work too. $Socket = _FFStart("http://de.selfhtml.org/javascript/objekte/anzeige/option_value.htm") _FFFormOptionselect($Socket, "Auswahl", "name", "Bingo - gewonnen!", "value") Link to comment Share on other sites More sharing options...
Stilgar Posted March 22, 2009 Share Posted March 22, 2009 (edited) Hi, @Stilgar: Can you review _FFFormOptionselect function. I think it doesn't work. I used ur example but it not work too. $Socket = _FFStart("http://de.selfhtml.org/javascript/objekte/anzeige/option_value.htm") _FFFormOptionselect($Socket, "Auswahl", "name", "Bingo - gewonnen!", "value") Hi, ok there's a problem. I'll fix this with the next update. Workaround for it: _FFSetGet($Socket,'window.content.frames["top"].document.forms[0].elements[0].options[4].selected=true') ; OR _FFXPath($Socket,"//form[@name='Testform']//select[@name='Auswahl']//option[@value='Bingo - gewonnen!']","selected=true",5) Edited March 22, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
Stilgar Posted March 23, 2009 Share Posted March 23, 2009 I've fixed the bug in _FFFormOptionselect and uploaded a new version:FF.au3 V0.4.1.4bChangelog jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
longnhi Posted March 23, 2009 Share Posted March 23, 2009 Thank you very much. Can you check Function _FFLoadWait again, i think it work not good. I used that function but it couldn't wait untill the page loaded. And i think the function _FFFormRadioButton have problem too, i think it wrong with type=checkbox. I edited that function with type=radio and it work good. Sorry about my English. Link to comment Share on other sites More sharing options...
Stilgar Posted March 24, 2009 Share Posted March 24, 2009 (edited) @longnhi:Where do have problems with _FFLoadWait? Can you show me an example, please.The problem with _FFFormRadioButton is fixed. I rebuild the function _FFFormCheckBox and forget that _FFFormRadioButton was based on it There's the (last) update for the "old" version of the FF.au3:FF.au3And there's the new one (without $Socket-parameters) to test:FF.au3 V0.5.0.0ChangelogExample for V0.5.0.0:#include <FF.au3> If _FFConnect() Then _FFTabAdd("google.com") If _FFObjCreate("google", "window.content.document") Then MsgBox(64, "Cookie", _FFObj("google.cookie")) MsgBox(64, "Domain", _FFObj("google.domain")) _FFObjDelete("google") EndIf _FFTabClose("Google","label") EndIf Exit ;=============================================================================== Func _FFObj($sObject) $RetVal = _FFSetGet("try{FF_AutoItScript." & $sObject & ";}catch(e){'Err'};") If Not @error And $RetVal <> "Err" Then Return $RetVal Else SetError(1) Return 0 EndIf EndFunc ;==>_FFObj ;=============================================================================== Func _FFObjCreate($sNewObject, $sObject) If StringRegExp($sNewObject, "[\W]+") Then Return 0 $RetVal = _FFSetGet("try{FF_AutoItScript." & $sNewObject & "=" & $sObject & "}catch(e){};FF_AutoItScript." & $sNewObject & " ? 1 : 0;") SetError(Number($RetVal)) Return $RetVal EndFunc ;==>_FFObjCreate ;=============================================================================== Func _FFObjDelete($sObject) Return _FFSetGet("delete FF_AutoItScript." & $sObject & ";!FF_AutoItScript." & $sObject & " ? 1 : 0;") EndFunc ;==>_FFObjDelete Edited March 24, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
JinQi Posted March 24, 2009 Share Posted March 24, 2009 __FFStartProcess: ""C:\Program Files\Mozilla Firefox\firefox.exe" -new-window "http://www.google.com" -repl 4242 _FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 3 _FFConnect: AutoIt: 3.3.0.0 _FFConnect: FF.au3: 0.5.0.0b-0 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect ==> Timeout: Can not connect to FireFox/MozRepl on: 127.0.0.1:4242 _FFLoadWait: . __FFSend ==> Error TCPSend / TCPRecv: TCPSend: window.getBrowser().webProgress.isLoadingDocument __FFSend ==> Error TCPSend / TCPRecv: TCPSend: window.getBrowser().webProgress.busyFlags loaded in 0ms This is what i got when i use this line of code. #include <ff.au3> $Socket = _FFStart("http://www.google.com") Link to comment Share on other sites More sharing options...
Stilgar Posted March 24, 2009 Share Posted March 24, 2009 (edited) @JinQi:It looks like you haven't MozRepl installed.[EDIT]In V0.5.0.0b-0 the var $Socket (and all parameters for it) isn't used, anymore. It's replaced by the global variable $_FF_GLOBAL_SOCKET.But you only have to use it, if you wanna more then one connections to FireFox in your script. Edited March 24, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
JinQi Posted March 24, 2009 Share Posted March 24, 2009 Oops, what is that? Oh my dear, sorry for that. Thank you Sir! Link to comment Share on other sites More sharing options...
longnhi Posted March 24, 2009 Share Posted March 24, 2009 @Stilgar: The problem is it can't wait untill the page load complete when i use Sock or Proxy. Link to comment Share on other sites More sharing options...
JinQi Posted March 24, 2009 Share Posted March 24, 2009 __FFStartProcess: ""C:\Program Files\Mozilla Firefox\firefox.exe" -new-window "http://www.google.com" -repl 4242 _FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 3 _FFConnect: AutoIt: 3.3.0.0 _FFConnect: FF.au3: 0.5.0.0b-0 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 1684 __FFSend: navigator.userAgent __FFRecv: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729) _FFConnect: Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729) _FFSendJavascripts: Sending functions to FireFox ........... done _FFLoadWait: . __FFSend ==> Error TCPSend / TCPRecv: TCPSend: window.getBrowser().webProgress.isLoadingDocument __FFSend ==> Error TCPSend / TCPRecv: TCPSend: window.getBrowser().webProgress.busyFlags loaded in 0ms Here comes the second error. Link to comment Share on other sites More sharing options...
Stilgar Posted March 24, 2009 Share Posted March 24, 2009 __FFStartProcess: ""C:\Program Files\Mozilla Firefox\firefox.exe" -new-window "http://www.google.com" -repl 4242 _FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 3_FFConnect: AutoIt: 3.3.0.0_FFConnect: FF.au3: 0.5.0.0b-0_FFConnect: IP: 127.0.0.1_FFConnect: Port: 4242_FFConnect: Delay: 2ms_FFConnect: Socket: 1684__FFSend: navigator.userAgent__FFRecv: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)_FFConnect: Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)_FFSendJavascripts: Sending functions to FireFox ........... done_FFLoadWait: . __FFSend ==> Error TCPSend / TCPRecv: TCPSend: window.getBrowser().webProgress.isLoadingDocument __FFSend ==> Error TCPSend / TCPRecv: TCPSend: window.getBrowser().webProgress.busyFlags loaded in 0msHere comes the second error. Ok I found the problem, I'll upload a new version the next hour.@longnhi:I, see. I must try this. jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
JinQi Posted March 24, 2009 Share Posted March 24, 2009 I have not seen such complete functions of firefox. Keep it up! Link to comment Share on other sites More sharing options...
trinitrotoluen Posted March 25, 2009 Share Posted March 25, 2009 I have not seen such complete functions of firefox.Keep it up!You can use the 0.4.x version, it is more complete. Link to comment Share on other sites More sharing options...
Stilgar Posted March 25, 2009 Share Posted March 25, 2009 (edited) You can use the 0.4.x version, it is more complete. Why do mean this? The only differenz to V0.4.x is: in V0.5.x you don't have to use the Socket-parameter in every function. [EDIT] I've uploaded a new version with a fixed URL handling (_FFStart, _FFOpenURL, _FFTabAdd...) FF.au3 Edited March 25, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
trinitrotoluen Posted March 25, 2009 Share Posted March 25, 2009 Why do mean this? The only differenz to V0.4.x is: in V0.5.x you don't have to use the Socket-parameter in every function. [EDIT] I've uploaded a new version with a fixed URL handling (_FFStart, _FFOpenURL, _FFTabAdd...) FF.au3 I misunderstanded JinQi mean Link to comment Share on other sites More sharing options...
sambalec Posted March 31, 2009 Share Posted March 31, 2009 How to use _FFFormSubmit function with the new version of FF.au3 ? I need to submit forms Link to comment Share on other sites More sharing options...
Stilgar Posted April 1, 2009 Share Posted April 1, 2009 @sambalec:Same answer: FF.au3 how can i use _FFFormSubmit in the new script version jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
Recommended Posts