LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-09-2007, 02:09 PM   #1
metalx1000
Member
 
Registered: Jun 2006
Distribution: Debian
Posts: 112

Rep: Reputation: 16
Sending keys from a shell script


How would I, if I could, have a script that would wait and then send keystrokes to what ever app is in focus.

something like this:
Code:
#! /bin/bash

sleep 10s

sendkeys "hello world"
any help would be great.

thank
 
Old 02-09-2007, 02:45 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
I hope the following answer is not too outrageous. It doesn't address how to find out which window is in focus, but:

Step one: learn C.

Step two: learn about X-Window programming (which will be in C).

Step three:

Code:
man XQueryTree
man XSendEvent
Hope this helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 05:32 PM
Sending mail from shell with attached file loopoo Linux - General 3 11-17-2005 10:57 AM
Shell script sending mail mfrick Linux - General 5 09-01-2005 07:46 PM
shell script: sending data through the serial port funkymunky Programming 2 06-09-2004 11:47 PM
sending mail using shell meshmesh Linux - Software 1 01-25-2004 07:25 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration