I'm writing a macro, but I need it to hold down a selection of keys in order to activate anther macro that is specific to a particular program.
In this case, I need the program to hold down the caps lock key and press the right mouse button, then release the caps lock key.
If I can simulate that, then I can get on with the rest of my code. The rest of it's actually complete for the most part, since I was using anther less advanced macro program to emulate that task for me. At the moment though, it seems that macro program has ceased functioning, so I was wondering, since MacroSchedular can implement scripts written in visual basic, if it could also use visual basic to send the command for the tab key being pressed?
How to hold down the Caps Lock Key with Visual Basic?
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Macro Scheduler lets you use VBScript in your code, not Visual Basic. The two things are different.
But if that's what you meant, and if you really must send the tab key with VBScript you can do it using the code posted here:
http://www.mjtnet.com/forum/viewtopic.php?t=1696
E.g.:
But I wonder why you want to do this within VBScript, when all you need to do in Macro Scheduler is:
Press Tab
etc
But if that's what you meant, and if you really must send the tab key with VBScript you can do it using the code posted here:
http://www.mjtnet.com/forum/viewtopic.php?t=1696
E.g.:
Code: Select all
VBSTART
Sub Send
Dim Wsh
Set Wsh = CreateObject("Wscript.Shell")
Wsh.SendKeys "{TAB}"
End Sub
VBEND
Press Tab
etc
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?