Switching my setup program to webview2

Switching my setup program to webview2

Postby Otto » Sat Feb 10, 2024 1: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.

Image

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


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.

Image

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Switching my setup program to webview2

Postby Antonio Linares » Sat Feb 10, 2024 6:14 am

Dear Otto,

How do you supply your screenshot to chatgpt ?

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Switching my setup program to webview2

Postby Otto » Sat Feb 10, 2024 6: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".

2. 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".
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Switching my setup program to webview2

Postby Otto » Sat Feb 10, 2024 7: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


Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Switching my setup program to webview2

Postby Antonio Linares » Sat Feb 10, 2024 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Switching my setup program to webview2

Postby Otto » Sat Feb 10, 2024 8:24 am

Dear Antonio,
yes, Plus Plan.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Switching my setup program to webview2

Postby Antonio Linares » Sat Feb 10, 2024 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Switching my setup program to webview2

Postby Otto » Sun Feb 11, 2024 5:36 pm

Hello friends,

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

Best regards,
Otto


New with WebView2
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Switching my setup program to webview2

Postby anserkk » Mon Feb 12, 2024 6: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
Image


Looks nice :)
User avatar
anserkk
 
Posts: 1329
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Switching my setup program to webview2

Postby Otto » Mon Feb 12, 2024 8: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:
Image


My source uses a patching style.

Image



Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests