I am creating a script for the cash register software in JavaScript. I had to create a script that would offer to buy a customer's card if the price on the card is less than without it. The simplest and most optimal solution was to add a customer test card, compare prices, and then delete it. The problem is that the internal functionality of Frontol 6.18 does not work for adding a client card. Either that's the way it is, and I'm too bad at looking for information. Maybe there are knowledgeable people who can help with this?
There were ideas to open a window to add a client card and enter the test card number. However, I stopped at entering the number, because after opening the window, the script did not want to enter anything.
if (frontol.currentDocument.card.count == 0) {
var WShell = new ActiveXObject("WScript.Shell");
WShell.SendKeys("%x");
}
If you do the same method and add another WShell.SendKeys("card number");, this number will be inserted anywhere, but not in this window.