|
Post by (X) on Nov 10, 2023 21:01:25 GMT 1
I wandered off topic from a major project into a quick detour project and ended up making a keyboard sound effect utility that plays an MP3 file every time certain keys are pressed* to mimic the sounds of an old typewriter.
* FROM ANY APP IN WINDOWS!!!
All the sound files are included as resources, but, I had to copy them to disk before being able to use them with the MCI commands.
Thanks to Bing for the Icon design.
It should be fun for about 5 minutes, then your spouse will ask:"WTF are you doing?"
|
|
|
Post by (X) on Nov 11, 2023 3:39:43 GMT 1
An updated version with volume control... The volume setting is saved and recalled with SaveSetting and GetSetting functions.
|
|
|
Post by (X) on Nov 11, 2023 16:07:43 GMT 1
Another tweak... Added audio feedback while volume slider is repositioned...
Attachments:KB SFX.G32 (892.52 KB)
|
|
|
Post by (X) on Nov 11, 2023 22:22:19 GMT 1
Yet another tweak... Neon Blue and better file management.
Attachments:KB SFX.G32 (650.78 KB)
|
|
|
Post by scalion on Nov 12, 2023 19:28:55 GMT 1
Ho punaise, j'ai carrément éclaté de rire. Génial ! (Encore un sujet de discorde avec ma femme.)
|
|
|
Post by (X) on Nov 12, 2023 20:29:41 GMT 1
J'ai resté un peu étonné quand mon épouse a admise que après tout, c'était "cool".
I was a little surprised when my wife admitted that it was "cool" after all.
|
|
|
Post by (X) on Nov 12, 2023 20:36:18 GMT 1
I was wondering how this utility might be used as a small layer of 'security'. I worked out a way to intercept a Ctrl+<some number>: Ctrl+1, Ctrl+2 etc... to insert text such as <your email address> or <your_password>. For example, all a keylogger would see is Ctrl+<#> then the Paste command before the text appears in a password data field. This is a small security precaution, but, it may foil some programs that try to capture your key strokes.
To be sure, there are many many more precautions one can take. This is but a tiny example.
If you have any problems please reload the code, I am updating small tweaks without changing the version.
I am having intermittent problems* so I will post the code once I've worked out the bug. (*Shuts down on it's own.)
|
|
|
Post by (X) on Nov 13, 2023 1:09:23 GMT 1
This will code will create 2 data files containing gobbledygook text that is not human readable. Just place them in the same application directory as the "KB SFX" application.
It just uses the Crypt function provided by GFA-Basic 32 for Windows.
$Library "gfawinx" $Library "UpdateRT" UpdateRuntime ' Patches GfaWin23.Ocx
Dim i, a$, b$ // Create new encoding key... For i = 1 To 8 a$ = a$ & Hex(Rnd * $FF, 2) Next i
b$ = Crypt(a$, "ctrl+1 string")
Open "ctrl_1.dat" for Output As # 1 Print # 1, a$ Print # 1, b$ Close # 1
b$ = Crypt(a$, "ctrl+2 string")
Open "ctrl_2.dat" for Output As # 1 Print # 1, a$ Print # 1, b$ Close # 1 This new version of "KB SFX" will be able to read the "ctrl_1.dat" and "ctrl_2.dat" files from the application directory and deceipher the encrypted data and insert it wherever the cursor is when the user types: Ctrl+1 or Ctrl+2 when "KB SFX" is running.
I am having intermittent problems* so I will post the code once I've worked out the bug. (*Shuts down on it's own.)
|
|
|
Post by (X) on Nov 14, 2023 22:24:37 GMT 1
After figuring out and correcting for the error due to trying to restore the contents of the Clipboard with an empty variable... I think this version of KB_SFX will not have any more issues whatsoever. :) Nope! Still some hiccups...
Ok. It works better than ever.
I am learning a lot about how difficult it can be to send key strokes to another application.
'SendKeys' seems to need at least 18ms to complete a task dependably.
Attachments:KB SFX.G32 (655.65 KB)
|
|