Skip to main content

All Questions

Tagged with
0 votes
1 answer
450 views

PyWin32: detect "ready" before using SendKeys again?

I'm using the following code to send keystrokes to an application: import win32com.client import time process_id = 2032 # I change this value if needed shell = win32com.client.Dispatch("WScript.Shell"...
Robert's user avatar
  • 442
0 votes
0 answers
174 views

Why can't I send a ( to SendKeys in JScript? [duplicate]

Why when I send a ( to WScript.CreateObject("WScript.Shell").SendKeys() in Microsoft JScript do I get the following error? C:\js\test.js(7, 9) Microsoft JScript runtime error: Invalid procedure call ...
leeand00's user avatar
  • 26.1k
1 vote
0 answers
759 views

VBScript behaves weirdly using SendKeys to send a new line

I'm working on a very simple VBS script and I've ran into a really weird problem: I was originally using this code: Set wshShell=wscript.CreateObject("WScript.Shell") WScript.Sleep(2000) Dim i i = ...
8bit_coder's user avatar
1 vote
3 answers
1k views

Make sendKeys faster

I'm trying to create a program that will open "command prompt" and open a specific port using "sendKeys". Here is my code: Set Keys = CreateObject("WScript.Shell") oShell.ShellExecute "cmd.exe","...
Mr. Magic's user avatar
0 votes
0 answers
1k views

WshShell.SendKeys sends keys incorrectly

Ok, so I am trying to write a program that brings notepad to the foreground, then prints text to it with the SendKeys method. The problem is `set WshShell = CreateObject("Wscript.Shell") Wscript....
Hunter Robertson's user avatar
0 votes
2 answers
960 views

Ensure window focus before sending keys

I'm using a VBScript to SendKeys to a Cisco Client because it prompts for a username and password. However, I am having problems getting the command prompt focused. I added AppActivate before every ...
Joel Christophel's user avatar
5 votes
2 answers
2k views

WScript Sendkey doesn't accept Unicode Characters

I am trying to send char "ä" using WScript Sendkeys.Seems its not working . I found one post Does or Can VBscript's SendKeys support Unicode? My Code: Set sh = WScript.CreateObject("WScript.Shell") ...
workspace's user avatar
  • 378
0 votes
1 answer
2k views

VB script IE Automation to raise sendkeys to wait in the background and then execute

I'm doing an Internet Explorer Automation using the vb script from a *.vbs file. After detecting a button inside an iframe, I raise the click event of that button which opens a javascript Confirm box ...
Prakash M.'s user avatar
1 vote
1 answer
2k views

VBScript Error "Invalid or Unqualified Reference" with SendKeys Method

I am getting the following error with my code in a .vbs file: C:\...\Root_VBS_Script_1.vbs(19, 1) Microsoft VBScript runtime error: Invalid or unqualified reference 1 was unexpected at this time. ...
Jared's user avatar
  • 23
1 vote
2 answers
1k views

Is it possible to send Alt+Space to command prompt by using WSH javascript sendKeys method?

Following code doesn't work on Command Prompt. It sends only " ". Why? I'm using windows7. [js] var shellApp = new ActiveXObject("Wscript.Shell"); shellApp.appActivate("C:\\Windows\\system32\\cmd....
Kei Minagawa's user avatar
  • 4,463
0 votes
1 answer
952 views

App ignores VBS SendKeys

Trying to automate report generation by sending keystrokes to an application. I can bring the app forward but then it ignores all SendKeys commands. What is the problem? What should I try next? this ...
Nushi's user avatar
  • 9
2 votes
1 answer
4k views

wscript.sleep happening at wrong time

I don't know VBScript, but recently I needed to write a script that had the SendKeys functionality, and I couldn't do that in a batch file. When I run the following code from command prompt in my ...
gsgx's user avatar
  • 12.2k
0 votes
1 answer
5k views

Javascript statement for send keys

We have Set WshShell = CreateObject("WScript.Shell") WshShell.SendKeys("1") in VBScript. Is there any similar statement to send key strokes in javascript.
Ramsey Norton's user avatar
2 votes
2 answers
8k views

sending ctrl+c using sendkeys in ruby

I need to close the command prompt window using sendkeys function, but when I used the below code it did not work as running of some betch file is in progress so its not taking these below options. ...
wani's user avatar
  • 51