sendkeys

Sending keys to inactive application in C#/.NET

Hi, I have an application with combobox that contains names of currently running applications. As I understood from msdn library, SendKeys method can send keys only to active application. Is it somehow possible in .NET, to send keys also to inactive app? Or at least in WinAPI ? ...

What does Clipboard or SendKeys class has to do with WinForms?

Those two useful classes are both under the System.Windows.Forms reference.... I can't see much relation between those and winforms.. Does anybody know why they're there? thanks. ...

Automating old DOS application using Python

Is there a way to automate an old DOS application (16-bit, probably needs an emulator such as DOSBox) from Python (on Windows)? I would like to send keys and strings to the application, detect updates to the DOS "screen" and get the application output. It would be even better if the DOS application could run "hidden", i.e., not showing ...

Is there a sendKey for Mac in Python?

In Moc10.6, I want to put a active application to de-active, or minimize by Python I know I could use sendKey in Windows with Python, then what about in Mac? Thanks, guys! ...

.Net CF wait for application to display window before sending key strokes

A change in a vendor's WinMo application forces me to jump through some hoops to avoid forcing my users to log in every time. This is highly inconvenient as A) my users are farmworkers who aren't highly sophisticated and B) the application is not sensitive in the sense that there is any meaningful data associated with running the app on ...

SendKeys for Python 3.1 on Windows

The latest Python Sendkeys module is for Python 2.6. I can't upgrade it myself as it needs the C module to be recompiled. Does anyone know of a fairly easy alternative way to send keys to a window? Using win32ui.FindWindow() I can find the right window, then make it active with PyCWnd.SetActiveWindow(), so all that's needed is a simple...

Alternative to SendKeys that does NOT require an unlocked session

Situation: A GUI app contains functionality (off a menu option) that produces a frequently updated image to a directory. A logged-in, running instance of the app is the ONLY source for this image (functionality 'reliant' on display device). I have researched this to death - it is a sad fact. The GUI application offers COM interfaces, ...

WHen the applicaiton is running, how to keep checking which is the active window simultaneously ?

My application uses SendKeys to navigate through and enter data into the input fields (I know that is not the bestway to do it, but I have to work with this limitation). Now, I want to make sure that the correct window is active when the SendKeys are at work. One way to do confirm this is to check for the current active window before e...

SendKeys failing after 2 runs in thread

Python and SendKeys import SendKeys, threading, pyHook, pythoncom class Auto(threading.Thread): def run(self): SendKeys.SendKeys("{ENTER}",pause=0.1); print('Sent'); exit(); def OnKeyboardEvent(event): if event.Ascii == 22: Auto().start(); return True hm = pyHook.HookManager() hm.KeyDown = OnKeyboardEven...

Right click with SendKeys in .NET

I am using sendkeys in C# .NET. I have letters, arrow keys and enter working. I cant figure out how to send a right click for the context menu. I know i can press a key on my keyboard to do it but i have no idea how to send the msg. How do i? i googled and saw new MenuItem().PerformClick(); as a solution however i didnt see any affect...

Sending keystrokes from a C# application to a Java application - strange behaviour?

Hi. I'm trying to send keystrokes from my C# program to a Java application The code for sendig keys is: private void SendKeysToWindow(string WindowName, string KeysToSend) { IntPtr hWnd = FindWindow(null, WindowName); ShowWindowAsync(hWnd, SW_SHOWNORMAL); SetForegroundWindow(hWnd); SendKeys.Send(Key...

system.windows.forms.sendkeys.sendwait not working when window is maxmize

I am sending keystrokes to other running application by using SendKeys.SendWait. But it is not working if the target application is not minimize. Is anything wrong with this method? What are the other methods to send keystrokes to running application. Code Block that I am using: SetForegroundWindow(handleToApplication); Sys...

Python Detect Keystrokes Sent to Another Application

I have a Python program that sends keystrokes to another application using SendKeys. Some of the keystrokes, however, must be sent to the application after it does some processing (which takes an unknown amount of time). So far I have had to let the Python application know the processing was finished by Alt+Tabbing back to the DOS window...

Python Send Keystrokes to Non-Active Application

I'm automating some common GUI tasks I have to do in an application, and I'm using a Python program and SendKeys to do it. So far I've had to activate the application I'm sending keys to (since SendKeys just sends the keystrokes to the active window), but I'd like to be able to send keystrokes to an application in the background. Is ther...

Problem while using SendKeys to programatically type a filepath

I have to use SendKeys to send a filepath to a text box in VB6. The code is like this - cSK.SendKeys "c+(:)\Test.txt" I have replaced the : with +(:) to enable SendKeys to type out : and not ; (It is like holding the shift key down). My problem is - when I execute this code, it all works fine but the text that is typed into the text...

Double key typing by SendKeys

I am having a weird problem with SendKeys.Send Basically what happens is this. I have Internet Explorer in focus at google.com and I call SendKeys.Send("TestSample\n"); it sometimes sends some keys twice (like TeestSample or TestSSSample) in an unpredictable way. It happens about 20% of the time. Also, when I include a space in the str...

SendKeys.Send("{HOME}"), vb.net

I am using SendKeys.Send("{HOME}") in a MaskedTextBox to bring the cursor to the beginning of the textbox when the text is empty. When I try to close the project the application freezes if it doesn't have focus. How do I put this application in focus before I call SendKeys? Public Class Form1 Private Sub MaskedTextBox1_GotFocus(ByVa...

VB6 SendKeys() permission denied error

I am trying to use the SendKeys() command to another window with my VB6 app. What I wanted is to click a button, and then have 10 seconds to go to the other window before the app sends some keys to that window. I got everything sorted but for some reason when I call something like this: SendKeys ("A") I get this error: Run-time erro...

how do i send keystrokes to only one program?

i have been having a hard time to find anything that is usefull but i found someone asked how to do that,(http://stackoverflow.com/questions/2113950/how-to-send-keystrokes-to-a-window) if used the code and i can set notepad's text but i want to send keys but sets the text, i want to send keys like keybd_event i have been using it but i ...

Vb.net sendkeys, letters duplicate?

I created a simple test with SendKeys, and tried both SendWait and Send. Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click System.Threading.Thread.Sleep(10000) SendKeys.SendWait("If you can read this, it works." + "{ENTER}") End Sub I tested in skype, and a few of the letters double...