Jump to content

Recommended Posts

Posted

I'm not so familiar with this UDF so I ask about this following information:

https://www.fxsitecompat.com/en-CA/docs/2016/plug-in-support-has-been-dropped-other-than-flash/

Whether MozRepl is using NPAPI and Is that mean that MozRepl will be discontinued ?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

I'm trying this little snippet:

#include "FF.au3"
#include <FileConstants.au3>

; trying to connect to a running FireFox with MozRepl on
If _FFConnect(Default, Default, 3000) Then
    _FFOpenURL('http://wolnelektury.pl/')
    Local $sHTML = _FFReadHTML("html")
    Local $sFile = @ScriptDir & '\ZRODLO.html'
    FileDelete($sFile)
    Local $hFile = FileOpen($sFile, $FO_OVERWRITE + $FO_UTF8)
    FileWrite($hFile, $sHTML)
    FileClose($hFile)

    Sleep(3000)
    If _FFDisConnect() Then MsgBox(64, "", "Disconnected from FireFox!")
Else
    MsgBox(64, "", "Can't connect to FireFox!")
EndIf

And I get content with wrong encoding

  Quote
Expand  

How to solve this ?

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted (edited)

I get:
 

<a href="/info/wesprzyj/">Dowiedz się więcej</a>

I should be:

<a href="/info/wesprzyj/">Dowiedz się więcej</a>

 

EDIT:
I just found this:

 

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/24/2017 at 3:35 PM, Danp2 said:

1) Your link isn't valid

Expand  

Why ?

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/24/2017 at 3:51 PM, Danp2 said:

Not the one in your code. The one below it that points to https://www.autoitscript.com/info/wesprzyj/.

Maybe the link was accidental?

Expand  

oh, now all is clear.
I just copy them from this page and past to forum.
Yes, just accidental.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Hola amigos, soy nuevo en este foro y planeo quedarme un buen tiempo por aquí, últimamente he estado probando la librería FF.au3 y algunas funciones funcionaron otra no he podido hacerlas funcionar por eso pido ayuda aquí por favor, la función que no he podido hacer funcionar es: "_FFClick" esa función no he podido conseguir hacerla funcionar en firefox, si alguien me ayuda estaré eternamente agradecido saludos y éxitos.

Posted (edited)

so I made this testing scirpt:

#include "FF.au3"
#include <FileConstants.au3>

; trying to connect to a running FireFox with MozRepl on
If _FFConnect(Default, Default, 3000) Then
    _FFOpenURL('http://wolnelektury.pl/')
    Local $sHTML = _FFReadHTML("html")
    Local $sFile = @ScriptDir & '\ZRODLO_' & @YEAR & '-' & @MON & '-' & @MDAY & '_' & @HOUR & '-' & @MIN & '-' & @SEC & '.html'

    FileDelete($sFile)
    Local $hFile = FileOpen($sFile, $FO_OVERWRITE + $FO_UTF8)
    FileWrite($hFile, $sHTML)
    FileClose($hFile)

    Sleep(3000)
    If _FFDisConnect() Then MsgBox(64, "", "Disconnected from FireFox!")
Else
    MsgBox(64, "", "Can't connect to FireFox!")
EndIf

And for checking encoding problem I create this script:

#include <WinAPI.au3>

_Example()
Func _Example()
    Local $sFileFullPath = FileOpenDialog('Select File', @ScriptDir, 'HTML File (*.html)')
    Local $hFile = FileOpen($sFileFullPath, $FO_READ + $FO_UTF8_NOBOM)
    Local $sFileContent = FileRead($hFile)
    FileClose($hFile)

    ClipPut($sFileContent)

    Local $aTags = StringRegExp($sFileContent, '>[^<>]+?<', 3)
    For $iTag_idx = 0 To UBound($aTags) - 1
        ConsoleWrite("! " & $aTags[$iTag_idx] & @CRLF)
        ConsoleWrite("> " & StringInStr($sFileContent , $aTags[$iTag_idx]) & @CRLF)
    Next

EndFunc   ;==>_Example

 

And the problem is that in clipboard I still have wrong data (incorrect encoding), but AutoIt is showing them correctly (following screenshot is showing proper content in SciTE console ).

 

FROM CLIPBOARD.png

 

My question is:
How to save data to HTML file with proper encoding ?

 

 

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

@mLipok Still having some trouble understanding the issue. How did you create the "From Clipboard" file. If you had used the 1st script, it would have been named differently.

When I run the two scripts, the output looks like this --

! >
        Biblioteka internetowa Wolne Lektury
      <
> 558
! >X<
> 1245
! >
            Wesprzyj!
          <
> 1353
! >Dowiedz się więcej<
> 1440
! >Pomóż uwolnić książkę!<
> 1608

 

Posted (edited)
  On 4/25/2017 at 10:45 AM, Danp2 said:

How did you create the "From Clipboard" file.

Expand  

This line:

ClipPut($sFileContent)

puts content to Clipboard.

I just open new document In SciTE , paste content and save them as file.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/25/2017 at 10:45 AM, Danp2 said:

If you had used the 1st script, it would have been named differently.

Expand  

First script create html file which I want to process on different PC station.

This html file will be processed and stored in SQL DB.
Becasue this file will be stored I need to write this file with proper encoding - because defalut Windows viewer (IE / Chrome / FF) will show this file with this incorrectly encoded content.

 

I ask my question in another way.

If 

ClipPut($sFileContent)

puts content with wrong encoding, why ConsoleWrite showing strings with proper encoding ?

 

I'm sure I'm missing something, but I can not understand it because in IE UDF everything worked out correctly in all my projects, but here using FF UDF something is strange to me and I'm confused.

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

Problem is solved by using:

Local $hFile = FileOpen($sFile, $FO_OVERWRITE + $FO_UTF8 + $FO_BINARY)

instead:

Local $hFile = FileOpen($sFile, $FO_OVERWRITE + $FO_UTF8)

 

But now ConsoleWrite from second script is showing:

  Quote

! >Dowiedz si꡷i뤥j<

Expand  


I know this is all Encoding problem, but why $FO_BINARY change this ?

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

I know I can install MozRepl from the internet, but on some station without Internet Access it is impossible.

I need to get current MozRepl XPI file but I can't find current released XPI file signed  by author.
Would you point me to this.
 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted
  On 4/26/2017 at 11:52 AM, Danp2 said:

You can download from here and then try renaming the file from .zip to .xpi

Expand  

Not working :(

 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...