Arclite86 Posted January 2, 2015 Share Posted January 2, 2015 (edited) I have a long script that moves from page to pagemore than 10,000 pages, sometimes somehow it loses it focus than i get a error message for example I started google and at one point I closed the window: expandcollapse popup__FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "https://google.com/" "-repl 4242 " _FFConnect: OS: WIN_81 WIN32_NT 9600 _FFConnect: AutoIt: 3.3.10.2 _FFConnect: FF.au3: 0.6.0.1b-10 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 732 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 __FFSendJavaScripts: Sending functions to FireFox ........ __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 . __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 . done _FFLoadWait: . __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 . loaded in 594ms 0 __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFRecv: 0 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFRecv: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFRecv: __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 _FFSearch ==> No match: $sSearchString: http://google.com __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFRecv: [object HTMLDocument] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFRecv: __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err _FFSearch ==> No match: $sSearchString: http://google.com __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFRecv: 0 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: 1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: 1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: 1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: 1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: 1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err _FFSearch ==> No match: $sSearchString: http://google.com __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFRecv: 1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: 1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFSearch ==> No match: $sSearchString: http://google.com __FFRecv: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFRecv: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :10053 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.frames[0].frames[0].document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value _FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.frames[0].frames[0].document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value _FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.frames[0].frames[0].document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value _FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.frames[0].frames[0].document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value _FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.frames[0].frames[0].document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value _FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.WCD=window.content.wrappedJSObject.top.frames[0].frames[0].document;}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value _FFFrameEnter ==> Invalid value: Frame not found $vFrame: 0 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.search=/http://google.com/i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value I need some code that opens a new firefox window when it loses it focus on the pages it tried something like this: If @error Then _FFStart("https://google.com/") _FFTabAdd("http://google.com") EndIf Edited January 2, 2015 by Arclite86 Link to comment Share on other sites More sharing options...
Arclite86 Posted January 3, 2015 Author Share Posted January 3, 2015 Can somebody help me with this please I just need to know how I can automaticly activate a function after this error shows up: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 Link to comment Share on other sites More sharing options...
nitekram Posted January 3, 2015 Share Posted January 3, 2015 (edited) Once that value is returned, check for the value, and if it is not what is expected, then run your function. IF __FFWaitForRepl() = "-1" then ; or "Error TCPSend / TCPRecv: TCPRecv :-1" SomeOtherFunction() EndIf edit, updated the text to compare? Edited January 3, 2015 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow."  WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI  CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator Link to comment Share on other sites More sharing options...
Danp2 Posted January 3, 2015 Share Posted January 3, 2015 Have you considered calling _FFIsConnected to check the connection status? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted January 5, 2015 Author Share Posted January 5, 2015 (edited) I have tried this: expandcollapse popup_FFStart("https://www.google.nl/") _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFSearch("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf But it just keeps opening new firefox windows expandcollapse popup>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\joesoef pc\Desktop\autoit\twitter programma\new program\twittermachine.au3" /UserParams +>17:37:15 Starting AutoIt3Wrapper v.2.2.0.0 SciTE v.3.4.1.0 Keyboard:00020409 OS:WIN_81/ CPU:X64 OS:X64 Environment(Language:0413) +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\joesoef pc\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\joesoef pc\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\joesoef pc\Desktop\autoit\twitter programma\new program\twittermachine.au3 +>17:37:16 AU3Check ended.rc:0 >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\joesoef pc\Desktop\autoit\twitter programma\new program\twittermachine.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "https://www.google.nl/" "-repl 4242 " _FFConnect: OS: WIN_81 WIN32_NT 9600 _FFConnect: AutoIt: 3.3.10.2 _FFConnect: FF.au3: 0.6.0.1b-10 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 752 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0 __FFSendJavaScripts: Sending functions to FireFox .. __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 .. __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 .. __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 .... done _FFLoadWait: . loaded in 60ms [object HTMLDocument] - {location: {...}, gbqf: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, ...} __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFRecv: 1 __FFSend: try{FFau3.search=/https://www.google.nl//i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFSend: ; __FFWaitForRepl ==> Error return value: MozRepl ....> __FFRecv: __FFSend: try{FFau3.search=/https://www.google.nl//i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFRecv: __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "https://www.google.nl/" "-repl 4242 " _FFConnect: OS: WIN_81 WIN32_NT 9600 _FFConnect: AutoIt: 3.3.10.2 _FFConnect: FF.au3: 0.6.0.1b-10 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 796 __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 _FFConnect: Browser: __FFSendJavaScripts: Sending functions to FireFox ..... __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 ..... done _FFLoadWait: .. __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :-1 . loaded in 869ms [object HTMLDocument] - {location: {...}, gbqf: {...}, location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, ...} __FFSend: try{content.frames.length}catch(e){'_FFCmd_Err';}; __FFRecv: 1 __FFSend: try{FFau3.search=/https://www.google.nl//i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFSend: ; __FFRecv: __FFWaitForRepl ==> Error return value: MozRepl ....> __FFSend: try{FFau3.search=/https://www.google.nl//i;FFau3.search.test(FFau3.WCD.documentElement.textContent);}catch(e){'_FFCmd_Err';}; __FFSend: ; __FFRecv: __FFWaitForRepl ==> Error return value: MozRepl ....> __FFStartProcess: ""C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window "https://www.google.nl/" "-repl 4242 " _FFConnect: OS: WIN_81 WIN32_NT 9600 _FFConnect: AutoIt: 3.3.10.2 _FFConnect: FF.au3: 0.6.0.1b-10 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 784 __FFWaitForRepl ==> Error TCPSend / TCPRecv: TCPRecv :10053 __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{navigator.userAgent}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value _FFConnect: Browser: __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{repl.search(/FFau3/i)}catch(e){'_FFCmd_Err';}; _FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{delete FFau3;}catch(e){e}; _FFCmd ==> Error return value __FFSendJavaScripts: Sending functions to FireFox .__FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3=new Object();FFau3.tmp="";FFau3.obj=null;FFau3.WCD=window.content.top.document;}catch(e){'_FFCmd_Err';}; ._FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: FFau3.simulateEvent=function simulateEvent(a,b,c){try{var d=document.createEvent(b);switch(b){case"MouseEvents":d.initMouseEvent(c,true,true,window,0,0,0,simulateEvent.arguments[4],simulateEvent.arguments[5],false,false,false,false,0,null);break;case"KeyboardEvent":d.initKeyEvent(c,true,true,null,false,false,false,false,simulateEvent.arguments[3],0);break;case"Event":d.initEvent(c,true,true);break}a.dispatchEvent(d);return 1}catch(e){return-3}return 0}; ._FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: FFau3.GetLinkInfo=function GetLinkInfo(i,a){var b="";with(FFau3.WCD){try{b=links[i].href+a;b+=links[i].hash+a;b+=links[i].search+a;b+=links[i].name+a;b+=links[i].id+a;b+=links[i].text+a;b+=links[i].innerHTML+a;b+=(links[i].hasAttribute("target")?links[i].target+a:a);b+=links[i].protocol+a;b+=links[i].port;return b.replace(/[\s]+/g," ")}catch(e){return-3}}}; _FFCmd ==> Error return value .__FFSend ==> Error TCPSend / TCPRecv: TCPSend: FFau3.GetLinks=function GetLinks(a){var b="";with(FFau3.WCD){try{for(var i=0;i<links.length;i++){b+=this.GetLinkInfo(i,a)+"\n"}return b}catch(e){return-3}}}; _FFCmd ==> Error return value .__FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.SearchImageBySize=function SearchImageBySize(a,b,c,d){var e="";with(FFau3.WCD){for(var i=0;i<images.length;i++){var f=images[i].width;var g=images[i].height;switch(c){case"eq":if((f<=b+b/100*d&&g<=a+a/100*d&&f>=b-b/100*d&&g>=a-a/100*d))e+=" "+i;break;case"lt":if((f<=b&&g<=a)&&(f>=b-b/100*d&&g>=a-a/100*d))e+=" "+i;break;case"gt":if((f>=b&&g>=a)&&(f<=b+b/100*d&&g<=a+a/100*d))e+=" "+i;break;default:return-1}}return e}};}catch(e){'_FFCmd_Err';}; ._FFCmd ==> Error return value __FFSend ==> Error TCPSend / TCPRecv: TCPSend: FFau3.findPos=function findPos(a){try{var b=c=0;if(a.offsetParent){do{b+=a.offsetLeft;c+=a.offsetTop}while(a=a.offsetParent);return b+" "+c}}catch(e){return-3}} _FFCmd ==> Error return value . >Process failed to respond; forcing abrupt termination... >Exit code: 1 Time: 30.08 Have you considered calling _FFIsConnected to check the connection status? I cant find an example how this works, could you please tell me how Edited January 5, 2015 by Arclite86 Link to comment Share on other sites More sharing options...
Danp2 Posted January 5, 2015 Share Posted January 5, 2015 I have tried this: But it just keeps opening new firefox windows Your code makes no sense to me. What is the call to _FFSearch supposed to accomplish. Your If statements are comparing a string literal to nothing. Â I cant find an example how this works, could you please tell me how Search the forums and you will find multiple threads where this command is used. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted January 6, 2015 Author Share Posted January 6, 2015 I think the firefox is connected but sometimes there is a pop-up and then it gets stuck I did this and it worked: expandcollapse popup_FFStart("https://www.google.nl/") _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf _FFOpenURL("https://www.google.nl/") IF "Error TCPSend / TCPRecv: TCPRecv :-1" Then _FFStart("https://www.google.nl/") EndIf but every time a new window opens,it always gives this message:Error TCPSend / TCPRecv: TCPRecv :-1 first, so thats why it keeps opening new windows everytime but this start-up message on shows up 2 or 3 times after starting up but when it really loses it focus it shows more then 100 times (depends on the time) so i wonder of there is a way it will only activate  after the message:Error TCPSend / TCPRecv: TCPRecv :-1 is at least been show 20 times Link to comment Share on other sites More sharing options...
Danp2 Posted January 6, 2015 Share Posted January 6, 2015 Again, your script makes no sense to me. The text "Error TCPSend / TCPRecv: TCPRecv :-1" will only appear in the console, so it doesn't make sense to look for it in your script. _FFOpenURL sets the value of @error, so you should be check that to determine if the function call failed. P.S. It looks like you are using an older version of FF.au3. You should upgrade to b14, which contains a fix for the "__FFWaitForRepl ==> Error TCPSend / TCPRecv" issue. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted January 9, 2015 Author Share Posted January 9, 2015 (edited) I have tried _ffdisconnect but it doesnt work it opens allot of nieuw windows, but I need somthing like this: in the console this code wil appear allot: .__FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.tmp=window.getBrowser().webProgress;FFau3.tmp.isLoadingDocument && FFau3.tmp.busyFlags ? false: true;}catch(e){'_FFCmd_Err';}; but it only appears allot when the script failed so i need something like: if console 20 x .__FFSend ==> Error TCPSend / TCPRecv: TCPSend: try{FFau3.tmp=window.getBrowser().webProgress;FFau3.tmp.isLoadingDocument && FFau3.tmp.busyFlags ? false: true;}catch(e){'_FFCmd_Err';}; then (do something) this will only work Edited January 9, 2015 by Arclite86 Link to comment Share on other sites More sharing options...
Danp2 Posted January 9, 2015 Share Posted January 9, 2015 P.S. It looks like you are using an older version of FF.au3. You should upgrade to b14, which contains a fix for the "__FFWaitForRepl ==> Error TCPSend / TCPRecv" issue. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Arclite86 Posted January 9, 2015 Author Share Posted January 9, 2015 where do i download the b14? i only see version v3.3.12.0 on this page https://www.autoitscript.com/site/autoit/downloads/ Link to comment Share on other sites More sharing options...
Danp2 Posted January 9, 2015 Share Posted January 9, 2015 You want b14 of FF.au3, not AutoIT. You can find it in the primary FF.au3 thread. Latest Webdriver UDF Release Webdriver Wiki FAQs 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