JinQi Posted April 3, 2009 Share Posted April 3, 2009 <input type="image" value="ok" border="0" name="s1" src="img/en/b/b1.gif" width="80" height="20" onmousedown="btm1('s1','','img/en/b/b2.gif',1)" onmouseover="btm1('s1','','img/en/b/b3.gif',1)" onmouseup="btm0()" onmouseout="btm0()"></input> I'm having problem to click this image as this image doesn't return a link for me. I can simulate the click with other images but not this. Link to comment Share on other sites More sharing options...
JinQi Posted April 3, 2009 Share Posted April 3, 2009 It's okie, i solved it with another function Link to comment Share on other sites More sharing options...
GerardJ Posted April 6, 2009 Share Posted April 6, 2009 Hi. I'm new to FF.au3 and I'm discovering its possibilities. It's seems to be a very fine piece of code, so I'm hoping I will be able to use it inside one of my projects at work. I've been evaluating it all day (so in other words, this is my first day on using it) and i'm trying to interact with some HTML pages buit by an existing aplication. One of pages is a list-box (a SELECT with options inside a form) so I used the _FFFormOptionselect() function. Its OK, I can select the value I want. But the problem is that this select has an onchange event, and when using the _FFFormOptionselect() this event is not raised. SO the page does not work (and there is no submit buton, and the onchange is doing more than a simple submit so I cannot use a simple _FFSubmit call) Is there a way to force this event using another function? or is this something missing in the _FFormOptionselect() function? (not a bug, but something not yet impemented..) I did not check (yet) if the behaviour is the same for the other fonctions (checking a checkbox or a radio button having some onclick event or so) or if it is limited to the Optionselect If someone could help me, please. Link to comment Share on other sites More sharing options...
Stilgar Posted April 7, 2009 Share Posted April 7, 2009 @GerardJ:Hi,currently only the _FFClick* functions fires a click event, for the _FFForm* functions such things are not implemented yet.@all:Something to test in the new test-version V0.5.1.4:FF.au3Some "pseudo-object" functions:- New: _FFObj: access to FireFox objects- New: _FFObjDelete: deleting objects in the FFau3-object- New: _FFObjGet: returns an "object" (string)- New: _FFObjNew: creates a new object in the FFau3-objectexample:#include <FF.au3> _FFConnect() Do _FFTabAdd("http://ff-au3-example.thorsten-willert.de/") _FFXPath("//form[2]//input[position()=1]","",9) ; creates an internal object "xpath" MsgBox(64,"", _FFObj("xpath","type")) ; OR MsgBox(64,"", _FFObj("xpath.value")) _FFObj("xpath.checked=true") Sleep(5000) _FFOpenURL("google.com") If _FFObjNew("google", "window.content.document") Then MsgBox(64, "Cookie", _FFObj("google","cookie")) ; OR MsgBox(64, "Domain", _FFObj("google.domain")) _FFObjDelete("google") ; :D EndIf $sInput = _FFObjGet("q", "name") ; returns a string - not an object! _FFObj($sInput, "value", "autoit") MsgBox(64, "Suche: ", _FFObj($sInput, "value")) _FFTabClose("Google", "label") _FFDisConnect() Until Not _FFIsConnected() Exit jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
GerardJ Posted April 7, 2009 Share Posted April 7, 2009 @GerardJ:Hi,currently only the _FFClick* functions fires a click event, for the _FFForm* functions such things are not implemented yet.Thank you for your answer. For the moment I will find a way to activate a copy on the javascript code defined in the onchange event handler so I'm not blocked, and later, when the events are implemented, I will just delete this temporary code.===By the way, it seems that the _FFFormSubmit() functions always returns an error if we try to submit with form name. The example code in your package is returning the error:__FFSend: try{content.document.login.elements.length;}catch(e){"_FFFormSubmit_Error";};__FFRecv: _FFFormSubmit_Error_FFFormSubmit ==> No match: No Elements found in form: loginSame with your last version "0.5.1.4b-1" just retested.Could you have a look, please? Link to comment Share on other sites More sharing options...
Stilgar Posted April 7, 2009 Share Posted April 7, 2009 Thank you for your answer. For the moment I will find a way to activate a copy on the javascript code defined in the onchange event handler so I'm not blocked, and later, when the events are implemented, I will just delete this temporary code.===By the way, it seems that the _FFFormSubmit() functions always returns an error if we try to submit with form name. The example code in your package is returning the error:__FFSend: try{content.document.login.elements.length;}catch(e){"_FFFormSubmit_Error";};__FFRecv: _FFFormSubmit_Error_FFFormSubmit ==> No match: No Elements found in form: loginSame with your last version "0.5.1.4b-1" just retested.Could you have a look, please?This error is fixed now:FF.au3 jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
GerardJ Posted April 7, 2009 Share Posted April 7, 2009 This error is fixed now:FF.au3wonderful, and so fast!thank you. Link to comment Share on other sites More sharing options...
dug Posted April 8, 2009 Share Posted April 8, 2009 Hello everybody, sorry for my english, i am french... Is that this udf can save the web page in local disk? During the save of the page, I have messages of error which I shall like to avoid for my automatisaion. These messages appear when an object of the page is not downloadable. Thank you in advance for your answers. Link to comment Share on other sites More sharing options...
GerardJ Posted April 9, 2009 Share Posted April 9, 2009 Is that this udf can save the web page in local disk? During the save of the page, I have messages of error which I shall like to avoid for my automatisaion. These messages appear when an object of the page is not downloadable.How are you saving your page? what is the error you get? is it inside the Autoit console or on Windows? A way to save pages is to first get the whole HTML from the current page using _FFReadHTML, and then use standard AutoIt functions FileOpen, FileWrite and FileClose to create a file. You will get all the HTML and none of the embedded content, but maybe it is sufficient... Example without any error check: $sHTML = _FFReadHTML("html", 6) ; the whole HTML $file = FileOpen($filename, 2) ; mode 2 = erase existing file FileWrite($file, $txt) FileClose($file) Link to comment Share on other sites More sharing options...
longnhi Posted April 10, 2009 Share Posted April 10, 2009 Hi, did u fix _FFLoadWait Function when using with socks or proxy Link to comment Share on other sites More sharing options...
Stilgar Posted April 10, 2009 Share Posted April 10, 2009 Hi, did u fix _FFLoadWait Function when using with socks or proxySorry, I can't see a problem, I've tried some proxies on localhost, squid and wwwoffle in my network and some proxies in the internet, but I can't see any difference to a direct connection, only some speed differences._FFLoadWait uses the nsIWebProgress-interface from FireFox so why should there any difference between a proxy and a direct connection? jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
JinQi Posted April 12, 2009 Share Posted April 12, 2009 _FFFormOptionselect can someoneshow me how to use it? Link to comment Share on other sites More sharing options...
Authenticity Posted April 12, 2009 Share Posted April 12, 2009 #include <FF.au3> Dim $sURL = 'http://www.autoitscript.com/forum/index.php?showforum=2' _FFConnect() _FFTabAdd($sURL) _FFCmd('content.document.getElementsByName("jumpmenu")[0].scrollIntoView();') Sleep(1000) _FFFormOptionselect('f', 'name', 'sj_home', 'value', 'jumpmenu', 'name') Link to comment Share on other sites More sharing options...
JinQi Posted April 12, 2009 Share Posted April 12, 2009 <form method="POST" action="build.php"> <input type="hidden" name="id" value="25"> <input type="hidden" name="t" value="2"> <input type="hidden" name="a" value="4"> <table class="f10"> <tr> <td>Offering</td> <td><input class="fm" name="m1" value="" size="4"maxlength="6"></td> <td> <select name="rid1" size="" class="fm"> <option value="1" selected="selected">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> </select> </td> How do i use _FFFormOptionselect to select the 2nd option? Link to comment Share on other sites More sharing options...
crazydude Posted April 12, 2009 Share Posted April 12, 2009 (edited) I get this error when trying to analyze http://facebook.com Edited April 12, 2009 by crazydude Link to comment Share on other sites More sharing options...
Authenticity Posted April 12, 2009 Share Posted April 12, 2009 (edited) <form method="POST" action="build.php"> <input type="hidden" name="id" value="25"> <input type="hidden" name="t" value="2"> <input type="hidden" name="a" value="4"> <table class="f10"> <tr> <td>Offering</td> <td><input class="fm" name="m1" value="" size="4"maxlength="6"></td> <td> <select name="rid1" size="" class="fm"> <option value="1" selected="selected">Option 1</option> <option value="2">Option 2</option> <option value="3">Option 3</option> <option value="4">Option 4</option> </select> </td> How do i use _FFFormOptionselect to select the 2nd option? I think you'll need to use _FFXPath or if you know the form index then you can use _FFFormOptionselect() but I didn't test it with indexed form. _FFXPath('//select[@name="rid1"]//option[@value="2"]', 'selected=true', 9) Edited April 12, 2009 by Authenticity Link to comment Share on other sites More sharing options...
Stilgar Posted April 14, 2009 Share Posted April 14, 2009 (edited) I get this error when trying to analyze http://facebook.comDo you have always this error, if you trying it?@JinQi:_FFFormOptionselect($vElement = 0, $sElementMode = "index", $vOption = 0, $sOptionMode = "index", $vForm = 0, $sFormMode = "index")e.g. for the second form:_FFFormOptionselect("rid1", "name", 2, "value", 1)or like Authenticity said via _FFXpath. Edited April 14, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
crazydude Posted April 14, 2009 Share Posted April 14, 2009 Ya, everytime. Link to comment Share on other sites More sharing options...
Stilgar Posted April 15, 2009 Share Posted April 15, 2009 (edited) Ya, everytime.I can't reproduce that error on http://facebook.com. Can you show me the output/console of the editor, please? ---- Update to V0.5.3.2: - New: __FFDialogWait($sText[, $sTitle = ""[, $sClose = "close"[, $iTimeOut = 10000]]]) Waits for FireFox dialog messages (alert ...) - Fixed: _FFConnect now returns an error if you try to connect to a non browser window (dialogs ..). - Fixed: _FFSetValueById and _FFSetValueByName can now set unicode chars, too. - Fixed: _FFCmd / _FFClick: fixed problems with element-names in arguments e.g: _FFCmd(".ElementName.ElementName ....") FF.au3 Edited April 15, 2009 by Stilgar jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
crazydude Posted April 15, 2009 Share Posted April 15, 2009 I can't reproduce that error on http://facebook.com.Can you show me the output/console of the editor, please?Editor logsso that I don't clutter up this page. Link to comment Share on other sites More sharing options...
Recommended Posts