|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
Is there an alternative to .SendKeys?
I have to create a VBscript(vbs) file that will automate an issue we have.
I need to open up Monarch, open a file, open a template, run the file with the template and save the output. I can do all this with sendkeys, but the window needs to remain active at all times. This would be no better than doing it manually. I need to be able to kick off this script and work on other things while it's running. Is this possible? Here is a sample of code I am currently using: vb Code:
the full code has way more .SendKeys commands
__________________
Come JOIN the party!!! Quote of the Month: Retirement: Because you've given so much of yourself to the company that you don't have anything left we can use. Questions to Ponder: What do you do when you see an endangered animal eating an endangered plant? iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm") copyright© 2008 sbenj69 |
|
#2
|
||||
|
||||
|
I'm generally not a cynic, but there is no way to accomplish this inside or outside of WSH.
Script and utilities actually simulate a user's keystrokes. Unfortunately, the Windows environment does not allow you to send keystrokes to a window that isn't in focus. The only thing I can recommend is to toggle the window's visibility as needed or find a way to script without the keystrokes.
__________________
Click the image if at any point you don't like my decision.Scripting problems? Windows questions? Ask the Windows Guru! |
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > Is there an alternative to .SendKeys? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|