Paste (Ctrl+v) for HP17B2 under Emu42 -- updated

All other HP calculators

Paste (Ctrl+v) for HP17B2 under Emu42 -- updated

Postby mike-stgt » Mon Apr 15, 2024 5:27 am

Update: Enable paste also for negative exponents.

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

It's complex but not complicated. Emu42 needs a KML which links buttons shown on the faceplate to keys of the PC which the AHK script will push (virtually) to type the number found in the Windows clipboard. Simple as that. Attached ZIP bundles the necessary files (except a ROM copy of the calculator). Note, the faceplate shows a brushed metal HP17B2plus while behind it there's a HP17B2 only.

How to make it work: You need Windows, native or by Wine or similar method. Install Emu42, unpack attached ZIP into Emu42 installation directory or where you keep your KML files. Start a session with the just unzipped KML, then quit it to save the state file -- remember its full path and file name (filetype must be "e17"). Install AHK. Edit the Emu17b2p.ahk with a text editor and rectify in line 18 path and file ID of the state file with the details of yours from 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 68 of the AHK script).

Have fun.
Attachments
Emu17b2p.zip
Bundle with faceplate, KML, KMI and AHK script
(49.46 KiB) Not downloaded yet
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