Jump to content

Recommended Posts

Posted

@Danp2 I just make my first Pull Request on GitHub, I'm not sure I do it properly :(

 

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 5/5/2017 at 8:00 PM, Danp2 said:

Since @Stilgar hasn't reappeared, I'm thinking about setting up a repo on Github to maintain it.

Expand  

Did you review @Stilgar version and merge his progress to GitHub version ?

 

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

is this intentional to return @error in this way :

Func _FFWindowClose($sSearch = "", $sSearchMode = "title")
    Local Const $sFuncName = "_FFWindowClose"

    If $sSearch = "" Then
        _FFCmd("window.close();")
        Return @error
    EndIf

 

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 5/22/2017 at 6:21 PM, mLipok said:

is this intentional to return @error in this way :

Func _FFWindowClose($sSearch = "", $sSearchMode = "title")
    Local Const $sFuncName = "_FFWindowClose"

    If $sSearch = "" Then
        _FFCmd("window.close();")
        Return @error
    EndIf

 

Expand  

Good question. Looks like _FFCmd will return $_FF_ERROR_RetValue when an error occurs, so it appears that the intent is to pass that up the chain to the calling routine.

Posted

Please add note about GitHub repository in first post.
Please also add relevant note about this support topic to the README.md file on GitHub.
 

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

Thanks.

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

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

There a discussion about encodings on previous page, so i wanted to ask :

if I get some html with $sHTMLsource = _FFReadHTML("html", 0) function, then:

- what actual encoding of $sHTMLsource, will it match "<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">"

- What I should use to convert $sHTMLsource from any (written in html header charset) to "UTF-16LE" (_WinAPI_MultiByteToWideChar() ? )

Posted (edited)

This is good news for me (EDIT: and I hope for community users who use this UDF  ) - that you ask this question.
Thanks for this.

Could you provied any example of URL which is not working for you properly ?
This could be any not this one which you are trying to automate.
Just must show as simple snippet.

As you can read I was intent to make a internal solution (inside UDF ) to this problem, but we need more url examples and testers who could say if it work's properly on different encodings. This mean all test which we will do for yours URL I plan to do on my URL :   http://wolnelektury.pl/

btw.
We must to do testing example for several URL with different encoding and languages, to test if all new modyfication will work properly.

 

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 5/24/2017 at 7:16 PM, Danp2 said:

I'm not yet convinced that this encoding solution should be built into the main UDF.

Expand  

What are your contraindications ?

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

First, I'm not sure that it isn't already working as designed.

Second, 

  On 5/5/2017 at 5:27 PM, jchd said:

If MozRepl returns UTF8 in all cases (I mean regardless of the encoding declared by the website, MozRepl converts everything to UTF8 for output), then it's safe [and even mandatory] to convert outputs to UTF16-LE for proper processing with AutoIt.

If the cake is half-cooked (MozRepl doesn't always output UTF8 in all cases) then things are much, MUCH difficult to deal with properly.
Yet I'd be a bit surprised if there are "significant" websites not using UTF8 today.

Expand  

we would need to analyze the MozRepl coding to see if it is consistently returning UTF8.

Third, all of this may be moot point with Firefox's pending move to WebExtensions.

https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/

Posted (edited)

Maybe I will say once again what I meant earlier.
User of this UDF knows when the problem is and when it does not exist.
Why not to give to user the ability to define a converter that works inside this UDF, in such a way, where user by simple/single declaration of conversion function, should be able to handle the whole automation problem in such cases ?

As I said, the user of this UDF (programmer / scripter) should set the proper data conversion method but only if he needs it. The question of whether it is needed should be user defined.

I hope now my concept is understandable and acceptable.

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

I'm only a lurker here: I don't program actually nor use FF for any automation, so my opinion is just thin air.

What I think is that regardless of the encoding use and declared by websites, the output provided to the AutoIt user must be directly useable inside the rest of his application(s). Else someone would need to regularly check the website declared encoding and modify applications accordingly. Instead, providing UTF16 strings in all cases would be the most reliable way.

That would need websites to declare the charset they use, as per specifications, and midware layer(s) ala MozRepl to behave consistently. Else all bets are off and applications using FF will need regular and painful maintenance.

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Posted
  On 5/24/2017 at 9:06 PM, jchd said:

Else someone would need to regularly check the website declared encoding and modify applications accordingly. Instead, providing UTF16 strings in all cases would be the most reliable way.

Expand  

Currently we do not have any solution.
I propose an situation when we change entire UDF to the way which will allow:

  1. for now: only preset manually encoding to give user ability to fix this problem now
  2. for future: provide an easy way to add automatically encoding recognition.

But as I said first step is to put "parser/convert" function into UDF which will process any kind of results before this result will be Returned out of function.

Having possibility to set "parser/converter" function we can check, work, improve this with other users.

 

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)
  On 5/24/2017 at 9:06 PM, jchd said:

That would need websites to declare the charset they use, as per specifications, and midware layer(s) ala MozRepl to behave consistently. Else all bets are off and applications using FF will need regular and painful maintenance.

Expand  

If the website does not correctly set the encoding option, then the user must still be able to customize the conversion method anyway.

 

EDIT:

  Quote

Else all bets are off and applications using FF will need regular and painful maintenance.

Expand  

This is called $$commercial$$ update :) 

 

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

Again I don't have experience working with FF but one possible way would be to enclose the current API with a stub which will first grab the header (or simply grab the page) and extract charset. Then perform the actual processing and maybe temporarily solve the issue with most websites. Non-conformal ones may need an extraparameter to force an ad-hoc conversion.

I now leave it to you guys who actually use the thing.

 

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

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...