Questions tagged [sendkeys]

A .NET class that sends one or more keystrokes to the active window as if they were typed at the keyboard.

A .NET class that sends one or more keystrokes to the active window as if they were typed at the keyboard.

MSDN Documentation for System.Windows.Forms.SendKeys

1218 questions
5
votes
1 answer

c# Pausing between sendkeys

I'm doing some automation on a Java-based web page that needs to do some validation between entries, so I thought I'd just do a Thread.Sleep between each SendKeys.Send, but for some reason it just sleeps for 10 secs (10 x 1sec pauses) as it loads…
rs82uk
  • 737
  • 2
  • 9
  • 23
5
votes
1 answer

In Selenium how exactly are the sendKeys() and setValue() methods different?

I've used both WebElement.sendKeys('') and WebElement.setValue('') In order to input text into fields. The vast majority of the time they seem to act the same, but I've found a few cases where setValue() works but sendKeys() does not. All I can…
C. Peck
  • 3,641
  • 3
  • 19
  • 36
5
votes
1 answer

C# - How to send small letters with SHIFT key using SendKeys.Send?

I am using this keyboard hook for my project. I am unable to send small letters using SendKeys.Send() with SHIFT modifier key pressed. My app needs (for example) if the user presses K button "a" should be sent and if he presses SHIFT+K, "b" should…
ePandit
  • 2,905
  • 2
  • 24
  • 15
5
votes
2 answers

Sending text/keystrokes to unselected window?

Is there a way to send keystrokes to a window that is not currently selected in C++? For example, if I have a notepad window minimized and want some text to be typed in it without bringing the window to the front. I'm using Windows 7 64-bit.
Tim
  • 51
  • 1
  • 2
5
votes
2 answers

Sending a caret with System.Windows.Forms.SendKeys.Send() will send & (ampersand)

When using SendKeys.Send() of System.Windows.Forms to send a caret ^ SendKeys.Send ("{^}") it will send an ampersand & instead. Why?
Tobias Knauss
  • 3,361
  • 1
  • 21
  • 45
5
votes
2 answers

Send keys not working selenium webdriver python

I need to send text to description textarea. There is some predefined text which is cleared after click. I tried to use clear() or click() before sendkeys but nothing works correctly. It will send text there but it is still grey and after saving…
vb381
  • 181
  • 1
  • 3
  • 14
5
votes
2 answers

Programmatically show the desktop

I am programming a Windows Form Application and I need to programmatically get back to the Desktop. I tried this code, but it is not working: using System; using System.Windows.Forms; private void ToggleDesktop() { SendKeys.Send("^({ESC}D)");…
FreaX
  • 94
  • 1
  • 9
5
votes
6 answers

Insert 2 blank rows after every currentregion

I need to insert 2 blank rows after every current region of data in Excel. Theoretically my code should work and insert it AFTER the data BUT after trying it out so many times, It inserts it BEFORE the data not after. Where did I go wrong? Can…
NewLearner
  • 149
  • 1
  • 3
  • 12
5
votes
5 answers

Change keyboard layout from C# code with .NET 4.5.2

I am coding away on my plugin for SDL Trados Studio. The last part of the plugin requires some automation that is not exposed by the APIs at all, so all I have (hold on to something) is to automate the default keyboard shortcuts. I have the code…
ib11
  • 2,530
  • 3
  • 22
  • 55
5
votes
2 answers

Simulating input: key pressed, hold and release

I am trying to simulate a user pressing a key, holding it for some specific time interval, and then releasing it. I have tried to implement this using SendKeys.Send(), but I cannot figure out how to control the duration of how long the key is…
NewBieS
  • 147
  • 2
  • 10
5
votes
4 answers

Does or Can VBscript's SendKeys support Unicode?

I am finding that VBscript's SendKeys does not support Unicode. It supports some like A-65, but not foreign letters like the letter Aleph (א) from the Hebrew alphabet. Prob outside its supported range. Could be for decimal values of 128+, it gives a…
barlop
  • 12,887
  • 8
  • 80
  • 109
5
votes
2 answers

tmux send-keys command appears twice on the screen

I am new to tmux, and find this really strange behaviour when I tried it. I write a really simple script tmux new-session -s "test" -d tmux send-keys -t test hello Enter tmux attach -t "test" when I run it, the shell shows the…
webberpuma
  • 691
  • 1
  • 6
  • 21
5
votes
7 answers

Press save button of "File download dialog" of internet explorer via c#

I am working on internet explorer automation and part of it involves downloading files from a site whcih is hosted on asp 2.0 and uses forms based authentication, so to create end to end automation I used browser automation. I was able to reach to…
Anirudh Goel
  • 4,571
  • 19
  • 79
  • 109
5
votes
2 answers

Trigger OS to copy (ctrl+c or Ctrl-x) programmatically

I'm working on a program to trigger cut and pastes Pastes I have no problem with (I just dump a string into the clipboard) Cut and or Copys are proving to be a little more difficult The program I have is out of focus and has several hot keys…
Crash893
  • 11,428
  • 21
  • 88
  • 123
5
votes
3 answers

SendKeys to inactive application

I am trying to figure out how I can make my C# application to send keys to another application window, without focusing on it. I have a list of words and 3 notepads files. Imagine I have all 3 notepad windows opened in order, and my program would…
user3036459