|
Post by jean on Oct 1, 2018 14:31:43 GMT 1
I'm using AutoHotKey hotstrings to automatically replace words in Windows applications. For instance:
::paris::Paris ::cafe::café ::voila::voilà ::fantome::fantôme
The first 2 work in vDos; when I type paris I get Paris, and cafe produces café. But when I type voila I get voil, and fantome produces fantme.
Is there a way to make those work, perhaps with another text substitution program better suited for DOS?
|
|
|
Post by Jos on Oct 1, 2018 16:16:53 GMT 1
This is consequent: á and ô in all words are discarded? What if you paste voilà or fantôme, is the DOS code page set correctly, so á and ô are defined in there? Since vDos is a Windows program, “better suited for DOS” doesn’t really apply.
Jos
|
|
|
Post by jean on Oct 1, 2018 16:42:47 GMT 1
It's consistent as far as I can tell.
I can paste those words in vDos without problem. Not only that, I can type them in. With the US-International keyboard layout enabled, typing voil`a gives voilà, and typing fant^ome gives fantôme. As I found out recently this is only possible in vDos, not in Dosbox nor vDosPlus. That's why I was expecting automatic Autohotkey hotstrings replacement to work in vDos.
|
|
|
Post by Jos on Oct 1, 2018 16:54:43 GMT 1
Strange, if you submit the AutoHotKey word substitution program, I’ll have a look…
Jos
|
|
|
Post by jean on Oct 1, 2018 17:51:26 GMT 1
Please find the 32-bit AHK executable (64 bit is over 1M and can't be attached). I also attach a test script. Right click and run.
|
|
|
Post by jean on Oct 1, 2018 23:34:06 GMT 1
Here's an interesting new information. I wanted to try this on an older XP machine. So I downloaded vDos 2015.04.10 and ran it there. Et voilà, AHK substitutions all work on XP!
Update: the obvious next thing to try was running vDos 2015.04.10 on the 64-bit Windows 8 machine. And it works there too. So here we go, I can now use all my substitutions, a great bonus given that I have almost 10,000 of those...
In general, I'd say it's non trivial for vDos to support AutoHotkey. Lots of people use it to automatically replace or insert text, remap keys, execute tasks, etc.
Update2: Long substitutions don't make it. For instance ::slf::San Luigi dei Francesi When I type slf I get San Luigi de Also ::baionette::baïonnette gives baïonne So there's still something not quite right compared with other Windows applications which all work fine with AHK.
|
|
|
Post by Jos on Oct 2, 2018 13:30:19 GMT 1
2015.04.10 was the latest version that used the SDL library to communicate with the Windows messaging system. Basically SDL did the translation of the sent keys by AHK. vDos is since then responsible for that itself, sent key messages for characters not found on the keyboard layout do not correspond to those generated by Windows when actual typing them with dead keys (neither ALT) combinations. So I now added handling those messages.
Don’t think AHK key stuffing is used that much in combination with vDos, you’re the first to notice it doesn’t work completely as expected.
If you count the number of characters in “slf San Luigi de”, you get 16: The maximum the BIOS keyboard buffer can hold. Since keypresses (and AHK sent keys) go directly into that buffer, “i Francesi” was just dropped. I added a buffer full test at moving queued characters to that buffer.
If these changes are w/o consequences, they will be in the next version.
Jos
|
|
|
Post by jean on Oct 2, 2018 14:57:43 GMT 1
Thanks for the explanations, Jos.
Because AHK can exclusively remap keys in specified windows, it could be quite useful for programs running under vDos I should think.
Looking forward to the next version.
|
|
|
Post by jean on Oct 2, 2018 16:53:09 GMT 1
PS: I see now that typing speed matters. Some words have to be typed very slowly for the substitution to occur, even something as simple as ::rosa::Rosa. If typed at normal speed the last letter is missing.
The buffer size issue for longer substitution is definitely not so important.
|
|
|
Post by Jos on Oct 2, 2018 18:45:15 GMT 1
Does this mean the “a” of “rosa” is missing. Dropping the last character is only with words defined in the AHK macro, or also with something like “rose”?
Jos
|
|
|
Post by jean on Oct 2, 2018 20:06:30 GMT 1
You're right the a is missing in Rosa and the e is missing in Rose. Strange.
Incidentally I found the LINS parameter in 2015.04.10. It's very useful for GrandVIew which can support up to 50 screen lines. I couldn't find this parameter in the newer vDos version. Another name perhaps?
|
|
|
Post by Jos on Oct 2, 2018 20:19:32 GMT 1
The missing last character is only with vDos 2018.05.01, not other Windows programs? If the last character is always dropped, you wouldn't be able to type anything. "rose" stalls at "ros", so "ros" at "ro", "ro" at "r", "r" at "" The LINS and COLS directives are consolidated into a single TEXT. Jos
|
|
|
Post by jean on Oct 2, 2018 20:32:07 GMT 1
No, it's only in some words that the last character is dropped, Rosa, Rose. Rome sometimes works, Rosi always works...
|
|
|
Post by jean on Oct 2, 2018 20:49:23 GMT 1
...But Rosa works fine with the latest vDos, though other words don't. For instance ::meme::même works in 2015.04.10 but not in the latest version.
|
|
|
Post by Jos on Oct 2, 2018 21:01:45 GMT 1
Dropping the last character is only with version 2015.04.10 (or earlier). The same mishap with DOSBox, so definitely the SDL library is to blame, both use that. BTW, "Rosi" also doesn't work always.
The converted “ê” is of course still disgarded in 2018.05.01, that will be fixed in the next version (I tested meme -même).
Jos
|
|