Page 1 of 1

Switching my setup program to webview2

PostPosted: Sat Feb 10, 2024 1:44 am
by Otto
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

Re: Switching my setup program to webview2

PostPosted: Sat Feb 10, 2024 6:14 am
by Antonio Linares
Dear Otto,

How do you supply your screenshot to chatgpt ?

thanks

Re: Switching my setup program to webview2

PostPosted: Sat Feb 10, 2024 6:57 am
by Otto
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".

Re: Switching my setup program to webview2

PostPosted: Sat Feb 10, 2024 7:14 am
by Otto
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

Re: Switching my setup program to webview2

PostPosted: Sat Feb 10, 2024 7:45 am
by Antonio Linares
Dear Otto,

Do you pay the chatgpt monthly suscription ?

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

Re: Switching my setup program to webview2

PostPosted: Sat Feb 10, 2024 8:24 am
by Otto
Dear Antonio,
yes, Plus Plan.

Best regards,
Otto

Re: Switching my setup program to webview2

PostPosted: Sat Feb 10, 2024 8:41 am
by Antonio Linares
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

Re: Switching my setup program to webview2

PostPosted: Sun Feb 11, 2024 5:36 pm
by Otto
Hello friends,

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

Best regards,
Otto


New with WebView2
Image

Re: Switching my setup program to webview2

PostPosted: Mon Feb 12, 2024 6:37 am
by anserkk
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 :)

Re: Switching my setup program to webview2

PostPosted: Mon Feb 12, 2024 8:23 am
by Otto
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