I'm trying to complete a simple macro that inserts a footnote and customizes how it displays. My macro simply sends a bunch of keys to TextMaker. However, the SendKeys statement does not seem to send the keys to TextMaker. It does not generate an error, it just doesn't do anything.
For example, the simplified script below will display the dialog box saying the macro completed without inserting the text "hello" into TextMaker. Am I doing something wrong?
Code: Select all
SendKeys "hello", True
MsgBox "All done!"
Edit: I tried the example program in the help file for the SendKeys statement that starts Calculator and sends it commands, and it also doesn't work. The Calculator starts, but none of the SendKeys statements do anything. I'm running on Windows 7 64-bit.
Also, how do I define a keyboard shortcut for a script once I've written it? The only way I can see to run a script is by using the Tools > Run Script menu command and then navigating to find the script. It defeats the purpose of automation if I have to do that every time!