#Include <FF.au3> If _FFStart("yandex.ru") Then $sHTML = _FFReadHTML() If Not @error Then FileWrite ("text.html", $sHTML ) ; filtered source-code $sHTML = _FFReadHTML("html",7) FileWrite ("text2.html", $sHTML ) EndIf
FF.au3 (V0.6.0.0b)
#121
Posted 19 August 2009 - 12:24 AM
#122
Posted 19 August 2009 - 07:17 AM
#Include <FF.au3> If _FFStart() Then _FFOpenURL("www.ya.ru") ;filter HTML tags from body $sHTML = _FFReadHTML("body",8) If Not @error Then $File = FileOpen("text.txt",2) FileWrite ($File, $sHTML ) FileClose($File) endif ;get innerHTML from html $sHTML = _FFReadHTML("html") If Not @error Then $File = FileOpen("text.html",2) FileWrite ($File, $sHTML ) FileClose($File) endif EndIf
#123
Posted 19 August 2009 - 08:21 AM
#124
Posted 19 August 2009 - 01:27 PM
Still NOT working for me
It's getting me results like * !45;0BL AB0@B>2>9 * >9B8 2 ?>GBC /=45:A. I'm out of any ideas, I've been looking for workarounds for 8 hours
You should read this page. Yandex page has page charset as windows-1251. The FF thinks that it is UTF-8. You have to get binary content of page.
Javascript can't get it. This .responseBody has IE's object Msxml2.XMLHTTP or XMLHttpRequest, only.
Yes. It is small problem with full binary content of page, I think.
#125
Posted 19 August 2009 - 04:05 PM
Excellent, I don't know if I ever would have managed to find that. I already wrote a workaround, but that is much less ugly than what I came up with. Thanks.Workaround to find the position of the content area:
https://wiki.mozilla.org/Accessibility/AT-Windows-API#How_to_Find_the_Content_Window_and_Load_the_Document
#126
Posted 21 August 2009 - 02:36 PM
FireFox has window with source of page, too. So there is a head trick to get html source, I think.
#127
Posted 22 August 2009 - 07:10 PM
#128
Posted 23 August 2009 - 09:13 AM
More often? The complete line is:Even you added Opt("TCPTimeOut", $_FF_CON_DELAY) but it still have that TCP 10053 error, and seem to be more often.
so I don't think you can have more timeouts then before.
I can only try some things, because I can't reproduce this error.
-------
New in the latest test-version:
_FFDispatchEvent($sElement, $sEventType = "change")
$sElement = Element or object from _FFXpath /_FFObj*
$sEventType = change|select|focus|blur|resize
http://thorsten-willert.de/Themen/FFau3/Testversion/FF.au3
#129
Posted 23 August 2009 - 04:56 PM
Hi, StilgarMore often? The complete line is:
so I don't think you can have more timeouts then before.
I can only try some things, because I can't reproduce this error.
-------
New in the latest test-version:
_FFDispatchEvent($sElement, $sEventType = "change")
$sElement = Element or object from _FFXpath /_FFObj*
$sEventType = change|select|focus|blur|resize
http://thorsten-willert.de/Themen/FFau3/Testversion/FF.au3
Actually I don't know where this error come from. It's really strange but I used your previous version this error happened when I compiled the script only if I ran from the editor it didn't happen. But this version it happens even I run from the editor
I will send you my script, please check it if you have free time.
Have a nice day.
Edited by trinitrotoluen, 23 August 2009 - 04:58 PM.
#130
Posted 26 August 2009 - 09:30 AM
See AFireFox_Full - v.1.2. hereI'm trying to read and save as file the source of a webpage that contains Cyrillic characters but i'm not able to get them right. I get the English ones write, but the Cyrillic are just some kind of garbage. Here is the source with an example of yandex.ru (popular russian search engine). Am I doing something wrong or FF.au3 doesn't support Cyrillic alphabet?
[ code='text' ] ( Popup )
Added two buttons:
Execute - call javascript functions from content current page
Source - get page source of current URL (incl. UTF-8)
It works fine with Russian page content, too.
#131
Posted 26 August 2009 - 07:00 PM
Thanks in advance
Regards
#132
Posted 26 August 2009 - 07:25 PM
If want to change programaticaly the action to do with *.lng from always wondering to recording (see thumbnail) Is it possible ?
Thanks in advance
Regards
You can do it by editing the "mimeTypes.rdf" in your profile-dir, or do you wanna change it while FF is running?
#133
Posted 26 August 2009 - 08:26 PM
I want to change it at the beginning of a session and after restore it at the end of the sessionYou can do it by editing the "mimeTypes.rdf" in your profile-dir, or do you wanna change it while FF is running?
I correct a problem in _MozRepl_Detect
The location of firefox when several installation has been made would be correct like this
If $bInstall Then
Local $sHKLM = "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Desktop"
Local $sFFExe = RegRead($sHKLM , "SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE\shell\open\command")
EndIf
Edited by LOULOU, 26 August 2009 - 08:28 PM.
#134
Posted 27 August 2009 - 08:11 AM
It' a bit complicated to made this while FF is running, I'm searching for a solution.I want to change it at the beginning of a session and after restore it at the end of the session
Are you sure, that you have "corrected" it?I correct a problem in _MozRepl_Detect
The location of firefox when several installation has been made would be correct like this
I have never seen a key like "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Desktop" anywhere. So the _MozRepl_Detect doesn't work here anymore.
I've used the registry descripted e.g. on this page:
https://developer.mozilla.org/en/Gecko_Plugin_API_Reference/Plug-in_Development_Overview
(near the bottom of the page "Plug-in Installation and the Windows Registry" - search for "PathToExe")
#135
Posted 27 August 2009 - 05:03 PM
It' a bit complicated to made this while FF is running, I'm searching for a solution.
Are you sure, that you have "corrected" it?
I have never seen a key like "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Desktop" anywhere. So the _MozRepl_Detect doesn't work here anymore.
I've used the registry descripted e.g. on this page:
https://developer.mozilla.org/en/Gecko_P...I_Reference/Plug-in_Development_Overview
(near the bottom of the page "Plug-in Installation and the Windows Registry" - search for "PathToExe")
So IN french XP pack SP3
Your Key is in HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox\3.5.2 (fr)\Main
and subkey Pathtoexe The return is C:\Program Files\Mozilla Firefox\firefox.exe
This key is dependant from the version of Firefox installed
Always IN Xp3 the following key
HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Desktop
subkey
SOFTWARE\Clients\StartMenuInternet\FIREFOX.EXE\shell\open\command
return the same thing "C:\Program Files\Mozilla Firefox\firefox.exe" but seems no to be dependant off version
This is only avalaible on French system , i can't try it on another foreign language
Can some one confirm or not this is the same problem in an XP English Version with Firefox 3.2
Thanks
#136
Posted 30 August 2009 - 01:27 PM
Die die die my darling
Don't utter a single word
Die die die my darling
Just shut your pretty mouth
I'll be seeing you again
I'll be seeing you
In hell
#137
Posted 30 August 2009 - 04:10 PM
_FFTABLEWritetoarray("tabListeDetail", "id", "text", True)
Here is the error message
__FFSend: try{window.content.wrappedJSObject.frames["top"].document.getElementsByTagName('table').length;}catch(e){'_FFCmd_Err';};
__FFRecv: 9
__FFSend: try{content.document.tabListeDetail}catch(e){'_FFCmd_Err';};
__FFRecv:
__FFSend: try{content.document.tabListeDetail.getElementsByTagName('tr').length}catch(e){'_FFCmd_Err';};
__FFRecv: _FFCmd_Err
_FFCmd ==> Error return value: _FFCmd_Err
FF.au3 (2830) : ==> Array variable subscript badly formatted.:
Local $a_TableCells[$i_cols][$trs]
Local $a_TableCells[^ ERROR
->18:00:35 AutoIT3.exe ended.rc:1
+>18:00:37 AutoIt3Wrapper Finished
#138
Posted 31 August 2009 - 10:39 AM
Do you have saved it as FF.au3 in your include-dir? e.g.:
c:\program files\autoit\include
@LOULOU:
I try to fix this in the next update.
For simple tables (no merged cells, no line breaks in cells) you can try something like this:
Global $aTable[1][1] $a = _FFXpath("//table[@id='tabListeDetail']//tr",default,6) $a[1] = StringStripWS($a[1],3) $aRow = StringSplit($a[1],@crlf) ReDim $aTable[$a[0]][UBound($aRow)-1] For $i = 1 To $a[0] $a[$i] = StringStripWS($a[$i],3) $aRow = StringSplit($a[$i],@crlf) For $j = 0 To $aRow[0]-1 $aTable[$i-1][$j] = StringStripWS($aRow[$j+1],3) Next Next _ArrayDisplay($aTable)
or this:
Edited by Stilgar, 31 August 2009 - 10:50 AM.
#139
Posted 31 August 2009 - 11:11 AM
Hi stligar,@toader:
Do you have saved it as FF.au3 in your include-dir? e.g.:
c:\program files\autoit\include
@LOULOU:
I try to fix this in the next update.
For simple tables (no merged cells, no line breaks in cells) you can try something like this:
Global $aTable[1][1] $a = _FFXpath("//table[@id='tabListeDetail']//tr",default,6) $a[1] = StringStripWS($a[1],3) $aRow = StringSplit($a[1],@crlf) ReDim $aTable[$a[0]][UBound($aRow)-1] For $i = 1 To $a[0] $a[$i] = StringStripWS($a[$i],3) $aRow = StringSplit($a[$i],@crlf) For $j = 0 To $aRow[0]-1 $aTable[$i-1][$j] = StringStripWS($aRow[$j+1],3) Next Next _ArrayDisplay($aTable)
or this:
Thanks for answering, I will correct in documentation _FFGetlength /// Tables option is forgotten
#140
Posted 31 August 2009 - 10:42 PM
@toader:
Do you have saved it as FF.au3 in your include-dir? e.g.:
c:\program files\autoit\include
yes is in .../autoit/include
now all is good.. but have new problem in FF - Page Analyzer.. can understand how to add page
and somebody know how i can do controlclick, controlsend in FFwindow?
Edited by toader, 01 September 2009 - 09:13 AM.
Die die die my darling
Don't utter a single word
Die die die my darling
Just shut your pretty mouth
I'll be seeing you again
I'll be seeing you
In hell
2 user(s) are reading this topic
1 members, 1 guests, 0 anonymous users
-
autohit




