FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Switching my setup program to webview2
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Switching my setup program to webview2
Posted: Sat Feb 10, 2024 01:44 AM
Hello friends,

Whenever I start with a new technique, I first change the setup program to incorporate the new technique. This way, our customers operate using the new technique in real-time, allowing us to receive feedback. Not much can go wrong, as the setup is not the most critical program. I am beginning to implement this approach now.
Regards,
Otto

1) First, I start with a screenshot of the existing program and have ChatGPT rebuild the screen in HTML.



2) I didn't program anything here, it's all from ChatGPT.



3) I am using the program that I posted here a few days ago with source code and am making a few adjustments.
The data is read from the INI and written back.



Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Switching my setup program to webview2
Posted: Sat Feb 10, 2024 06:14 AM

Dear Otto,

How do you supply your screenshot to chatgpt ?

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Switching my setup program to webview2
Posted: Sat Feb 10, 2024 06:57 AM

Dear Antonio,

I send the image to ChatGPT and ask if ChatGPT recognizes any text in the picture. Then, when ChatGPT provides the answer, I ask it to create an HTML program with a dialog for me.

It's actually hard to believe that there are no converters like rcToHtml, but I couldn't find anything.

What worked for me was converting the RC into a JSON and then transforming it with a html/JS program - reading it out after calling from the development tools. However, the result is worse than using screen recognition.

Best regards,

Otto

1) Yes, I can recognize the text in the image. It shows a window of software named "XWINHOTEL - WHSetup" with the date "2019-05-21" in the title bar. The window contains multiple tabs and input fields for various information likely related to a hotel or accommodation.

The tabs at the top are: "General", "Invoice", "Invoice 2", "Text", "Versions", "Statement", "Sales", "PlanSetup", "Master Data", "Printer", "File", "Marketing". The window is opened on the "General" tab, which contains input fields for basic operation information, such as name, address, bank account details, value-added tax identification number (VAT ID), phone, fax, email, homepage, operation name for reports, link to the Austrian Economic Chamber (WKO link), subtitle, GPS coordinates, and so on.

On the right side of the window, there are options for "Password Mode", "Appointment Reservation", "Currency", "Waiter Codes", and fields for entering "Tourist Tax", "Tourist Tax Account", "Article Number", "Operation Master Data", "Number of Rooms", "Number of Beds".

At the bottom, there are two buttons: "OK" and "Cancel".

  1. Please create an HTML dialog from this text. The window is opened on the "General" tab, containing input fields for basic information of the business, such as Name, Address, Bank Account Details, VAT Identification Number (ATU-NR), Phone, Fax, Email, Homepage, Business Name for Reports, Link to the Austrian Economic Chamber (WKO-Link), Subtitle, GPS Coordinates, and so on.

On the right side of the window, there are options for "Password Mode", "Appointment Reservation", "Currency", "Waiter Codes", and fields for entering "Tourist Tax", "Account Tourist Tax", "Item Number", "Basic Business Data", "Number of Rooms", "Number of Beds".

At the bottom, there are two buttons: "OK" and "Cancel".

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Switching my setup program to webview2
Posted: Sat Feb 10, 2024 07:14 AM
Hello friends,

I can't figure out how to use localStorage or the ExecuteScriptAsync method of WebView2.

Also, appending parameters to the local HTML file with query parameters gives me the error "Page not found" because, as I then found out, the file:// protocol does not support URL parameters by default in many environments, including WebView2.

I've made a workaround with a timer. It works well.

Best regards,
Otto


Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Switching my setup program to webview2
Posted: Sat Feb 10, 2024 07:45 AM

Dear Otto,

Do you pay the chatgpt monthly suscription ?

On the free version it seems as there is no way to supply an image...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Switching my setup program to webview2
Posted: Sat Feb 10, 2024 08:24 AM

Dear Antonio,

yes, Plus Plan.

Best regards,

Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Switching my setup program to webview2
Posted: Sat Feb 10, 2024 08:41 AM
You get the same using copilot from Bing, using GPT-4 and free:

https://copilot.microsoft.com/

It sumarizes videos, PDFs, creates images, etc.

It is difficult (or not) to understand why Microsoft compites with chatgpt, if they are their main supporters. Probably supporting them until they beat them
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Switching my setup program to webview2
Posted: Sun Feb 11, 2024 05:36 PM
Hello friends,

Now I have transferred the 12 screens from the existing setup to WEBVIEW2.

Best regards,
Otto


New with WebView2
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Switching my setup program to webview2
Posted: Mon Feb 12, 2024 06:37 AM
Otto wrote:Hello friends,

Now I have transferred the 12 screens from the existing setup to WEBVIEW2.

Best regards,
Otto


New with WebView2
Looks nice :)
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Switching my setup program to webview2
Posted: Mon Feb 12, 2024 08:23 AM
Dear Anser,
Than you. I have been using a perfect template (HYPER) so far. But now, as I understand everything a bit better,
I don't want to include any components (except for jQuery/Bootstrap).

You have to learn the syntax of the components, and then you reach a point where you can't cover something with the components,
and you then run into problems. But for example, HYPER template overrides the Bootstrap.css.

I have transposed the screens more or less with ChatGPT. I haven't done much manual reworking yet.

Best regards,
Otto

Here some css changes:



My source uses a patching style.





Continue the discussion