looking for an example for invoking keystrokes programmatically

Posted on 2013-09-06
Medium Priority
Last Modified: 2013-09-22

I have a simple need but do not have the knowledge to accomplish. I have a need for a program to be called (command line) and passed a parameter (i have this part).  The program then needs to save the string that was sent to it to the windows clipboard and then invoke a keystroke (Shift+F3).  The clipboard and keystroke are the piece i need some direction on.  

Question by:posae
1 Comment

Accepted Solution

APoPhySpt earned 2000 total points
ID: 39470744
take a look at this, it might point you in the right direction:

as for the clipbboard stuff there are a lot of examples out there, for example
public void somethingToRunInThread()
    System.Windows.Forms.Clipboard.SetText("String to be copied to Clipboard");

protected void copy_to_clipboard()
    Thread clipboardThread = new Thread(somethingToRunInThread);
    clipboardThread.IsBackground = false;

Open in new window


Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question