PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Alain Stucki

Pages: [1]
1
Programming / Re: creating UTF-8 text file
« on: March 10, 2024, 04:55:22 PM »
 :)
Hello
Thank you sooo much for your fast reply. This works great!

2
Programming / creating UTF-8 text file
« on: March 10, 2024, 05:19:57 AM »
Hello. I'm trying to get our product data into a CSV-file and use this to import our data into a webshop. So I OPEN LOCK (7)"datafile.csv" and then I PRINT the requried data into that csv-file.

That works fine. I can open the file with Windows Editor and everything looks good. But when I import the file into the webshop, the accented characters look weird.So the problem is the codepage . The shop requires UTF-8 file format. And the file my little program has created is ANSI. So my questions is: How can I create UTF-8 text files (no BOM) or would I need to use a CLI tool to convert the file from ANSI to UTF-8?

Best regards
Alain Stucki

3
Thank you very much for your fast replies, support and help!

4
Dera Mr. Austen

Thanks again for your help. While studying the manual for the INVOKE directive again, I came across a section that I don't understand and cannot find any further information in the manual.

In the manual you write:
*************************************************
Example:

invoke env("COMSPEC")+" /K DIR C:\WINDOWS"

Note:
The env("COMSPEC") when running on Windows determines the correct command processor to be used. Some Windows commands (such as COPY and DIR) are built into command process and can be called using this type of statement.
*************************************************

I realise that using the env("COMSPEC") commands like COPY, DIR etc that are integrated into command.com will be used. But what does the /K do? I understand the DIR C:\WINDOWS command but why is there a /K before the DIR command? When I time this into a cmd-window I get an error. So it's not a windows specific command.

This time I really tried to find the answer in the manual but I could not find what /K does and if there are any other such options available.

Best regards
Alain

5
Dear Mr. Austen

Thanks so much for your help. I tried it and YES.... it works!

I always thought the HIDE option would just minimize the window into the task bar, but now it does not appear at all. Fantastic.

Best regards
Alain Stucki

6
Hello
We are using WindX on our windows clients. We run some programs that can be as old as 40 years and have been written on MAI business basic. So in those days we used OPEN (7) "LP" and then Print (7)" bla bla bla" with printers directly attached to the computer using ESC-sequences for character-based printing.

When we made the move to PxPlus we wrote a little "choose your printer" program where you can choose a printer and then it does INVOKE WAIT "[lcl]net use lpt1: \\192.168.xxxx\printershare" so the LPT1 was re-directed by windows to the appropriate printer share. Then you can still print to LP and the data flow is redirected to the printer share.

We have multiple WindX windows open on a client so we can work in several of our programs the same time.  This runs great up until Windows 10. But when a client runs on Windows 11, after the NET USE command the focus of the window changes to another instance of WindX.

Imagine you have two WindX windows open and in the first one you do the NET USE to redirect LPT1 somewhere. Windows will quickly open a command line window, execute the NET USE command and close its window again. But on Windows 11 the focus is then set on the wrong WindX window. When you type on your keyboard, the input will be in the second WindX window. You have to Alt-TAB or take your mouse curser and click the first WindX window to continue. Which is very annoying. Especially as up until Windows 10 I didn't experience this behaviour on any client.

So I think this is not a PxPlus bug. It's rather based on some changes of Windows 11 so that when the command line window opens, Windows doesn't rememenber which window was active before that.

So I wonder if there is a way I can instruct PxPlus to do the NET USE command in an "invisible" command line window so that no command line window (looks like DOS window) is opened and therefore the focus stays on the active WindX window.

Or could this still be solved in an update of WindX?

Thanks already for your ideas.

Alain


7
Programming / Re: Record Expansion Factor
« on: September 26, 2022, 03:00:22 PM »
Hello Mr. King

Thanks for your fast and percise explanations.

As this is a VLR file I will use the GUI admin utility "Adjust Maximum Number of Records" when nobody is using PxPlus to set the max record size to a higher value and hope that your utility does all the necessary magic automatically  :)


8
Programming / Record Expansion Factor
« on: September 26, 2022, 11:45:07 AM »
Hello

Could someone please explain to me what Record Expansion factor is? See for example the attached screenshot. It's a variable length record of 400. I see a 10% record expansion factor. What does it mean and how can I use this? Furthermore I see that the record size range is indicated 400-2024. Now I'm completely confused... Can someone please enlighten me?

The reason I'm asking is that I have not enough space in this file. I would like to write records with a length of 430 characters instead of 400. So now I'm not sure if I can use 440 anyway without errors (those 10%) or as much as 2024. Or do I have to change the Max record size?

Of course I have checked the documentation but there is no explanation.

Thanks a lot in advance for your help and explanations.


9
Programming / Re: QR Code
« on: November 03, 2021, 06:23:26 AM »
Dear Mr. King

That's fantastic, thank you very very much! 👍

10
Programming / Re: QR Code
« on: October 30, 2021, 08:00:11 AM »
Dear Mr. King

Thanks a lot for your reply! As far as I understand it correctly, I would need to change this inside the makeqrcode program code, correct?

I can LOAD "MAKEQRCODE" but when I type LIST or IT I get a message that makeqrcode is password protected and I need to type it. Unfortunately I don't know the password ;-)

If you would like to keep it password protected, maybe you could provide 4 different versions of this program, one for each error correction level L, M, Q and H. For example makeqrcodel, makeqrcodem, makeqrcodeq, makeqrcodeh. Or a makeqrcode2 and add the option to be able to CALL it with the option of L,M,Q or H?

Best regards and thank you very much for your support!

11
Programming / Re: QR Code
« on: October 28, 2021, 02:01:01 PM »
Dear Mr King

Thanks for your explanation. I'm using Windows both on server and clients.

I have visited the website you have linked and see that qrencode does provide an option for 4 different error correction levels. So I think the qrencode running on your server would be capable of using the 4 different levels.

Is there a possibility you could add to *tools/makeqrcode the possibility that when I call this utility and include the option for the error correction, it will pass the option to the qrencode service running on your server so I get the according PNG back?

12
Programming / QR Code
« on: October 27, 2021, 02:25:17 AM »
Hello
From this topic: https://forum1.pvxplus.com/index.php?topic=205.0 I have learned how to create QR-Codes. And it seems to work fine. However, I found out that there are different levels of error correction in QR codes. Higher levels create bigger QR codes, but they become safer to read, even if you for example place a little logo on top of the QR code.
Is there any plan to further develop the *tools/makeqrcode tool to add more options like error-correction-level, size of PNG file, etc.?

Pages: [1]