Stilgar Posted September 1, 2009 Author Posted September 1, 2009 yes is in .../autoit/includenow all is good.. but have new problem in FF - Page Analyzer.. can understand how to add page can u say me? i pushed all butons.. but that dont help((and somebody know how i can do controlclick, controlsend in FFwindow?FF-Page-Analyzer:- Open FireFox and the page you want to analyze- Click on the "FF-Page-Analyzer" the "analyze" button- wait for the resultYou can't use controlclick, controlsend ... with FF, because it's a XUL application.What you wanna do? jEdit4AutoIt PlanMaker_UDF
6105 Posted September 1, 2009 Posted September 1, 2009 You can't use controlclick, controlsend ... with FF, because it's a XUL application.What you wanna do?i want to send needed text,like this:y = 100copy wood = xthen z = y-xand to wrote "z" in needed edit place [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]
Stilgar Posted September 1, 2009 Author Posted September 1, 2009 i want to send needed text,like this:y = 100copy wood = xthen z = y-xand to wrote "z" in needed edit placeIf you can show me the page or the HTML-Source of it then I can give you an example. jEdit4AutoIt PlanMaker_UDF
6105 Posted September 2, 2009 Posted September 2, 2009 (edited) If you can show me the page or the HTML-Source of it then I can give you an example.for test and example we can use this "http://www.muligambia.com/"in little orange chat box to can send "its work"...i think is 3 functions, click on edit box, write text, and simulate enter Edited September 2, 2009 by toader [center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Don't utter a single word[/font][/center][center][font=courier new,courier,monospace]Die die die my darling[/font][/center][center][font=courier new,courier,monospace]Just shut your pretty mouth[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you again[/font][/center][center][font=courier new,courier,monospace]I'll be seeing you[/font][/center][center][font=courier new,courier,monospace]In hell[/font][/center]
fspafford Posted September 3, 2009 Posted September 3, 2009 Stilgar, I have a question about _FFTableGetCell. I am using version $_FF_AU3VERSION = "0.5.3.7b". This code excerpt begining at line 124: ; title of the current page $sTitle = _FFCmd( ".title") ;If Not @error Then MsgBox(64,"Title of the current page:",$sTitle) if $sTitle <> "UserMgmtView.htm" Then SetError (1) EndIf $cell = _FFTableGetCell("Users", 2, 2, "id") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $cell = ' & $cell & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console $val = _FFXPath ("/html/body/form[@id='Form1']/center/table[@id='Users']/tbody/tr[2]/td[2]") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $val = ' & $val & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console shows this console output: __FFRecv: UserMgmtView.htm __FFSend: try{content.document.getElementsByTagName('tbody')['Users'].getElementsByTagName('tr')[2].getElementsByTagName('td')[2].textContent;}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err _FFCmd ==> Error return value: _FFCmd_Err @@ Debug(132) : $cell = >Error code: 8 __FFSend: FFau3.xpath=null;try{FFau3.xpath=window.content.frames[2].document.evaluate("/html/body/form[@id='Form1']/center/table[@id='Users']/tbody/tr[2]/td[2]",window.content.frames[2].document,null,XPathResult.STRING_TYPE,null).stringValue;}catch(e){'_FFXPath_Error: '+e;}; _FFTableGetCell ==> No match: Table/Column/Row: Users/2/2 __FFRecv: us0 @@ Debug(135) : $val = us0 >Error code: 0 I went with _FFXPath because I could not get _FFTableGetCell to work. Do you see any problems? Regards, Frank Frank
Stilgar Posted September 4, 2009 Author Posted September 4, 2009 (edited) ; title of the current page $sTitle = _FFCmd( ".title") ;If Not @error Then MsgBox(64,"Title of the current page:",$sTitle) if $sTitle <> "UserMgmtView.htm" Then SetError (1) EndIf $cell = _FFTableGetCell("Users", 2, 2, "id") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $cell = ' & $cell & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console $val = _FFXPath ("/html/body/form[@id='Form1']/center/table[@id='Users']/tbody/tr[2]/td[2]") ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $val = ' & $val & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console shows this console output: __FFRecv: UserMgmtView.htm __FFSend: try{content.document.getElementsByTagName('tbody')['Users'].getElementsByTagName('tr')[2].getElementsByTagName('td')[2].textContent;}catch(e){'_FFCmd_Err';}; __FFRecv: _FFCmd_Err _FFCmd ==> Error return value: _FFCmd_Err @@ Debug(132) : $cell = >Error code: 8 __FFSend: FFau3.xpath=null;try{FFau3.xpath=window.content.frames[2].document.evaluate("/html/body/form[@id='Form1']/center/table[@id='Users']/tbody/tr[2]/td[2]",window.content.frames[2].document,null,XPathResult.STRING_TYPE,null).stringValue;}catch(e){'_FFXPath_Error: '+e;}; _FFTableGetCell ==> No match: Table/Column/Row: Users/2/2 __FFRecv: us0 @@ Debug(135) : $val = us0 >Error code: 0 Hello, the only thing I see, is that _FFTableGetCell("Users", 2, 2, "id") and _FFXPath("//table[@id='Users']//tr[2]/td[2]") aren't the same cells, because the index in XPath is from 1-n and in HTML from 0-n so _FFTableGetCell("Users", 1, 1, "id") should work. @toader: OMG more bugs then HTML on this page and you must disable all security addons to get it to work But it works: (you must have the latest version of the FF.au3 - 0.5.3.8b) If _FFFrameEnter("JABBIFYNAME","name") Then $sName = "test" $sObj = _FFXPath("//div[@id='jabbify']//form/input","",9) _FFObj($sObj, "value", $sName) _FFDispatchKeyEvent($sObj, 13) ; pressing "enter" on the input-field ; or a little bit different $sText = "it works ..." _FFXPath("//div[@id='jabbify']//textarea","value='" & $sText & "'",9) _FFDispatchKeyEvent(".getElementsByClassName('jab_textarea')[0]", 13) _FFFrameLeave() EndIf bad example Normaly it looks much simpler. E.g. if you wanna use the search feature on this page: #include <FF.au3> If _FFConnect() Then _FFSetValueById("s", "TextToSearch") _FFFormSubmit() EndIf Edited September 4, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF
Stilgar Posted September 4, 2009 Author Posted September 4, 2009 Updated to V0.5.3.8b.Look at the first post for changes, please.@LOULOU:_FFTableWriteToArray should work now. jEdit4AutoIt PlanMaker_UDF
slayerz Posted September 5, 2009 Posted September 5, 2009 I had tried FF.au3, and thanks to the author.It's really helpful. BTW, is there any possibility to automate the installation of mozrepl.xpi? Maybe we can install it using command-line. Regards, slayerz AUTOIT[sup] I'm lovin' it![/sup]
Stilgar Posted September 5, 2009 Author Posted September 5, 2009 I had tried FF.au3, and thanks to the author.It's really helpful. BTW, is there any possibility to automate the installation of mozrepl.xpi? Maybe we can install it using command-line.Thank you!You can use this function to install MozRepl:_MozRepl_Detect jEdit4AutoIt PlanMaker_UDF
morawcik Posted September 8, 2009 Posted September 8, 2009 Hi. I have some problem. When I want selected some option in the login form on the site http://www.molehillempire.com/ i use this: If _FFConnect() Then _FFOpenURL("http://www.molehillempire.com") _FFSetValueById("login_user", "login") _FFSetValueById("login_pass", "pass") _FFCmd(".forms[1].elements[0].option[3].selected") EndIf But this _FFCmd don't work. I don't have any idea. Someone can help mi ?
Stilgar Posted September 8, 2009 Author Posted September 8, 2009 Hi. I have some problem. When I want selected some option in the login form on the site http://www.molehillempire.com/ i use this: If _FFConnect() Then _FFOpenURL("http://www.molehillempire.com") _FFSetValueById("login_user", "login") _FFSetValueById("login_pass", "pass") _FFCmd(".forms[1].elements[0].option[3].selected") EndIf But this _FFCmd don't work. I don't have any idea. Someone can help mi ? With this you ask IF this options IS selected: _FFCmd(".forms[1].elements[0].option[3].selected") You can select it with this: _FFCmd(".forms[1].elements[0].selectedIndex=3") Or you use the function _FFFormOptionselect: _FFFormOptionselect("server","name",3) jEdit4AutoIt PlanMaker_UDF
morawcik Posted September 8, 2009 Posted September 8, 2009 Hi. I have another problem. When i get inner html from site (utf-8): GUICtrlSetData($labPoziom, _FFCmd(".getElementById('level').innerHTML")) I get: SaBatkowy czeladnik but on the site is: Sałatkowy czeladnik (polish lang) In SciTE im using utf-8 encoding. How I can fix that or change all char ż,ź,ć,ł,ń,ś,ą,ó to z, c,l,n,s,a,o ?
trinitrotoluen Posted September 16, 2009 Posted September 16, 2009 <input class="image" type="image" src="images/click-me.gif"/>Hi,How can I click on the image like that ?
Stilgar Posted September 16, 2009 Author Posted September 16, 2009 (edited) How I can fix that or change all char ż,ź,ć,ł,ń,ś,ą,ó to z, c,l,n,s,a,o ? I'll try to fix this. How can I click on the image like that ? <input class="image" type="image" src="images/click-me.gif"/> You can click on it with e.g. _FFClick("image", "class") ; or _FFClick(".forms[n].elements[n]") ; replace n with the index ; or _FFClick( _FFXPath("//input[@type='image' and @src='images/click-me.gif']", "", 9 )) Edited September 16, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF
stratosgr Posted September 19, 2009 Posted September 19, 2009 Hi there, When trying to get information from websites containing non-english language i get non readable text (see attached image).. Heres an example:#include <FF.au3> #include <Array.au3> _FFConnect() If _FFIsConnected() Then _FFOpenUrl("www.google.gr") $aLinks = _FFLinksGetALL() _ArrayDisplay($aLinks) EndIfI tried converting to binary and then back to utf-8 with no luck. The scite editor is on UTF-8 encoding. Theres no problem when doing the same thing using ie and ie.au3 but i really need to use firefox and _FFXPath() function, which by the way, both rules. Thnx in advance Attached image:
morawcik Posted September 22, 2009 Posted September 22, 2009 I'll try to fix this.Thanks.I have another problem. When i make bot to game (molehillempire.com) and i need do any actions i need use _FFTabSetSelected or tab with game must be open. When bot runs actions every time i can't work on FF.Can i do sth on this game tab when i work on other tab ?
Stilgar Posted September 22, 2009 Author Posted September 22, 2009 @ stratosgr: Hello, like I said on post before yours: I'll try to fix this @morawcik: Just open a new FireFox-window and work there. jEdit4AutoIt PlanMaker_UDF
Stilgar Posted September 22, 2009 Author Posted September 22, 2009 Only it's work ?Sorry I don't understand what you mean.Just let your script work in one browser window and you can use an other window. jEdit4AutoIt PlanMaker_UDF
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