tags:

views:

153

answers:

2

Duplicate:

taking screenshots of an application using WSH Script

How can I use multiple keys in WSH Script like (ALT,CTRL,DELETE)? How can i take a screenshot of an application and paste it in MSWord using WSH SCript?

+3  A: 

Using SendKeys, you can't. I told you so.

Regarding sending multiple keys - please read the documentation on SendKeys() on MSDN. It's not hard to find out.

Maybe there is an ActiveX component somewhere that can take screen shots for you, but using vanilla Windows scripting, this cannot be done.

Tomalak
A: 

Yeah I think like Tomalak said, what you're trying to do will most likely involve invoking an ActiveX component using the CreateObject command.

I'd advise against it though, usually when you hit the point where your script is trying to invoke applications (Word) and take screenshots... it's time to invest in some development software (Visual Studio or something) and write an actual application.

If you're totally set on it though, DevGuru has a decent reference page for the CreateObject command.

Mxyzptlk