I am after the same thing as "Sendkey"... see question submitted today!
I tried your solution in the following way but it didn't work:
sub eften()
if gms.lbuttonup then
WshShell.Sendkeys("{F10}"
else
exit sub
end if
end sub
The error given was a runtime:
"object required: 'WshShell' (errcode=0x01A8)
I am sure that this all points to my poor understanding of some VBScript basics, but any help would be appreciated.
I'm not totally sure this is the correct object, but what you're missing is the instantiation of the object that does the sendkeys.
Code:
sub eften()
dim objShell
set objShell = CreateObject("wscript.shell")
if gms.lbuttonup then
objShell.Sendkeys("{F10}")
else
exit sub
end if
end sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.