Noitidart / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

Launching gedit causes autokey to no longer accept responses #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Script to launch gedit: system.exec_command("gedit")
2. Autokey will no longer substitute phrases
3. Problem disappears when instance of gedit thusly launched closes.  Then
remaining autokey scripts are parsed.  Problem occurs for open-office
document writer as well.

What is the expected output? What do you see instead?
Autokey substitution is expected in gedit.  Instead all substitutions wait
until gedit is closes

What version of the product are you using? On what operating system?
ubuntu 9.04, autokey Version 0.60.7a

Please provide any additional information below.

Original issue reported on code.google.com by dr.dave....@gmail.com on 2 Nov 2009 at 7:38

GoogleCodeExporter commented 8 years ago
Same here:

text = clipboard.get_selection()
kommando = "firefox 'http://www.google.de/search?q=%s'" % text
x = system.exec_command(kommando)

This freezes AutoKey. After closing Firefox, AutoKey will work again.
(Ubuntu 9.10, AutoKey 0.61.0)

Original comment by Matthias...@gmail.com on 28 Nov 2009 at 5:05

GoogleCodeExporter commented 8 years ago
The reason is because system.exec_command waits for the process to exit before 
it
returns, hence blocking the thread in autokey that handles all the expansions. 

Try adding an ampersand to the end of your command (&).

Original comment by cdekter on 24 Mar 2010 at 11:22

GoogleCodeExporter commented 8 years ago
OK no that won't help...

Added additional optional argument for system.exec_command in v0.61.6 - set 
getOutput
to False if you don't care about the output of the command. This way autokey 
won't
block if the command does not return to the shell immediately (e.g. like gedit 
does)

Original comment by cdekter on 25 Mar 2010 at 1:18