LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 03-27-2005, 07:37 PM   #1
lixy
Member
 
Registered: Apr 2004
Posts: 120

Rep: Reputation: 15
keyboard emulation from a script or program


Hi all,

I'd like to control some applications remotely and I'm wondering if there could exist a way to run scripts/program that when invoked act as keyboard presses.
Any kind of hint (language choice ...) is highly appreciated.

Thanks in advance.
 
Old 03-28-2005, 01:04 AM   #2
zeropash
Member
 
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208

Rep: Reputation: 30
i dont get the full requirements
if you want some program to deliver the key presses etc expect may have things that you expect. (pun intended)
any way check out expect and autoexpect.
 
Old 03-29-2005, 12:16 PM   #3
lixy
Member
 
Registered: Apr 2004
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks a million! Expect is very interresting indeed; Didn't expect such a tool to exist in my wildest dreams. Now I can automize telnet sessions!
Concerning my particular issue, as far as I can tell expect only interacts with programs of that were launched by it.
What I want to do is have a script that sends commands to programs which are already running to be able to control them by voice.
typing a
Code:
xmms -p
makes xmms play
and
Code:
xmms -s
makes it stop the playback
but this only work with xmms. When applying the same logic for a video player, it opens another instance of it.
Any more clues?
 
Old 03-29-2005, 12:36 PM   #4
lixy
Member
 
Registered: Apr 2004
Posts: 120

Original Poster
Rep: Reputation: 15
I found a workaround: Make xmms play my video using mplayer (there's a plugin for that)
Now back to the expect manual
Thanks so much again for your help!
 
Old 03-29-2005, 01:47 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,325

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Just curious, could you tell what voice program / libs do you use to do commands by voice ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mouse and keyboard emulation fiomba Linux - Software 0 11-21-2004 05:33 PM
Looking for a program for my multimedia keyboard setlec_seta Mandriva 0 10-29-2004 08:15 AM
Program MS Natural Keyboard mooreted Linux - Hardware 4 03-12-2004 02:24 PM
How to write a Vietnamese keyboard program for Linux Namhh Linux - Software 2 10-15-2003 08:31 AM
tn5250 emulation program problem cw_wd_riot Linux - Software 0 04-11-2002 03:12 PM

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

All times are GMT -5. The time now is 12:03 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