I want to replace a keyboard entry (CTRL PrntSc) with a mouse click (launching a batchfile). I know that there are SEND and SENDKEY codes but have not been able to make the code
Send("^{Printscreen}")
trigger the right effect.
AutoIT and AutoHotKey may be able to do it, but if the above can work, it seems simpler.
Press Keyboard keys using a batch file deals with a similar question in THIS forum i.e. with making a batchfile first open a program and then send keystrokes to it, but that looks complex and I need guidance in extracting the code for merely sending a batchfile hotkey command.
https://www.donationcoder.com/forum/index.php?topic=25389.0 Suggests the use of NirCMD and AutoIT as well as AutoHotKey and Macro Express. I have experience with the last two - but would need help with all four.
First comment (from Daniel Wisehart) I'm using Windows 10 - I hope that answers the PLATFORM query. I have already quoted the (ineffective) code of my batchfile. There are NO error messages. However the desired effect of the mouse cursor becoming Greenshot-cross-hairs did not eventuate. . Second comment (from Aacini) - thanks for your correction. Replacing "^{Printscreen}" with "^PRTSC" did not make the required difference. The mouse cursor still does not change to a cross-hairs.
I have tried the sample batch file in the 3rd comment (by Hackoo) - which seems extremely complex for just a conversion from a hotkey to a mouse click. It triggers a (blue, NOT black), 'DOS' window saying that "The screen can not be set to the number of lines and columns specified.' Then the text disappears and a little later the window closes. What is that code ? VB, Visual Basic, VBS, something else ?