Paste (Ctrl+v) for HP22S under Emu42 -- fixed

All other HP calculators

Paste (Ctrl+v) for HP22S under Emu42 -- fixed

Postby mike-stgt » Thu Apr 18, 2024 5:44 am

Bug fix -- start of exponent did't work, ZIP with updated AHK script attached.

Emu42 offers for several models the feature to paste numbers from the clipboard to a calculator. But not for the HP22S. To overcome this lack I use an AHK script to paste per automated typing. With it use Ctrl+v Instead of menu/edit/paste.

It's complex but not complicated. Emu42 needs a KML which links buttons on the faceplate to keys of the PC which then the AHK script will push (virtually) to type a number found in the Windows clipboard. Simple as that. Attached ZIP bundles the necessary files (except a ROM copy of the calculator).

How to make it work: You need Windows, either native or by Wine or similar methods. Install Emu42, unpack attached ZIP into Emu42 installation directory or where you keep KML files. Start a session with the just unzipped KML, then quit it -- remember full path and file ID (filetype must be "e22") of the saved state file. Install AHK. Edit the Emu22S.ahk with a text editor and rectify in line 19 path and file ID of the state file with the details of yours saved two step before. File it, run it. That's it.

Paste works only by Ctrl+v, not per menu/edit/paste. There is some fuzzy logic, so it does not matter if points or commas are used as decimal separators or for digit grouping while the calculator setting is irrelevant. Thus -1.618.033,98 and -1,618,033.98 will yield the same input. In addition, blank and single quotation mark may be used too for digit grouping. Hyphen indicate negative numbers, 'e' or 'E' indicate start of exponent with maximal three digits. Note, the fuzzy logic is not perfect, if it does not work for you adjust the RegEx according your requirements (see line 76 of the AHK script).

Note: Current version of Emu42 fails to copy the number on the stack iff there are variables and/or equations stored within the HP22S. To bypass this bug the attached AHK script diverts Ctrl+c to menu/edit/copy screen, thus numbers may be copied at least with the accuracy as displayed.

Have fun.
Attachments
EMU22S.zip
KML, KMI, AHK and faceplate for an HP22S under Emu42 offering working Ctrl+c and Ctrl+v
(74.72 KiB) Downloaded 457 times
mike-stgt
.........
.........
 
Posts: 182
Joined: Tue Dec 24, 2019 12:12 pm

Return to Other HP Calculators

Who is online

Users browsing this forum: No registered users and 1 guest