Page 3 of 3

Re: unwanted scrambling of text strings

Posted: 04 Oct 2023, 07:13
by mikeyww
Although I do not use DOS GUI-style programs such as WordPerfect for DOS, I guess this is progress if your script does not even work in Notepad on Windows. I would close all scripts and simply run the following one by itself. Activate the Notepad window. See whether both hotkeys work.

Code: Select all

#Requires AutoHotkey v1.1.33
F3::MsgBox 123
F4::Send 123
MsgBox is a simple way to determine whether the script is running and you are triggering a hotkey. If nothing happens with your Send command when Notepad is the active window, then it suggests that one of the issues from the cited page (Send failures) is present.

What is your AHK version?
What is your Windows version?
Are you running Notepad as administrator or as an elevated window?
Have you disabled antivirus to test?
Are other programs using the same (global) hotkey?

Re: unwanted scrambling of text strings

Posted: 04 Oct 2023, 07:30
by Jose-phil
F3 creates what I suppose is a message box, with '123' in it
F pastes '123' into Notepad

Re: unwanted scrambling of text strings

Posted: 04 Oct 2023, 07:39
by mikeyww
OK, so you do not like the other questions that I posted.
You can still test this newest script in your DOS program. If the Send does not work, you could try SendInput or just increasing the key delay as noted earlier. Aside from what is on the "Send fails" page, those are my only thoughts. You might want to test a hotkey such as a instead of F3.

Others with more experience may have some better ideas.

Good luck!

Re: unwanted scrambling of text strings

Posted: 04 Oct 2023, 08:03
by Jose-phil
I'm sorry - I'll answer them now
1. What is your AHK version? - v1.1.33.01
2. What is your Windows version? - x32Win10ProV22H2
3. Are you running Notepad as administrator or as an elevated window? - neither, just ordinary garden-variety
4. Have you disabled antivirus to test? - NO
5. Are other programs using the same (global) hotkey? - In WordPerfect, both F3 and F4 have a function, but I suppose that is not 'global'.

I test results above are in Notepad.

I already know that F3 get disabled by your script in WordPerfect, so l am not tempted to try that again.
F4 also has a useful function that I do not want to disable.

I substituted comma and period for F3 and F4 in the AHK and they produced nothing in WordPerfect, but did 'cause a shock'.

I'm quite happy to abandon the ambition of preventing Autohotkeys from scrambling text in WordPerfect, and find work-arounds.

Re: unwanted scrambling of text strings

Posted: 04 Oct 2023, 08:20
by mikeyww
OK! It's possible that others have posted in this forum about WordPerfect for DOS, too. If so, solutions might reside there.