RX14 / autokey

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

LXDE (Ubuntu 11.10 server): Simple Script does not work #203

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create the following simple Script

  retCode,pct = dialog.input_dialog("Function", "Enter Name")
  keyboard.send_keys("function(" + pct + "){}")

2. assign to any shortcut (I use jmain2)
3. let the script run.

Using "autokey     -l" it just deletes the word jmain2.
Using "autokey-gtk -l" it shows the dialog, after deleting jmain2. 
Using "autokey-qt  -l" it just deletes the word jmain2

Using Autokey 0.71.2

The script is so simple, I think it should do. Probably I missing something? 
The Debug output sometimes make me think that autokey interprets its own output 
again? Probably only an LDXE(Windowmanager)-problem?

The debug output of "autokey-qt" looks like this:

...
....
DEBUG - service - Raw key: u'j', modifiers: [], Key: u'j'
DEBUG - service - No phrase/script matched hotkey
DEBUG - service - Input stack at end of handle_keypress: [u'j']
DEBUG - service - Raw key: u'm', modifiers: [], Key: u'm'
DEBUG - service - No phrase/script matched hotkey
DEBUG - service - Input stack at end of handle_keypress: [u'j', u'm']
DEBUG - service - Raw key: u'a', modifiers: [], Key: u'a'
DEBUG - service - No phrase/script matched hotkey
DEBUG - service - Input stack at end of handle_keypress: [u'j', u'm', u'a']
DEBUG - service - Raw key: u'i', modifiers: [], Key: u'i'
DEBUG - service - No phrase/script matched hotkey
DEBUG - service - Input stack at end of handle_keypress: [u'j', u'm', u'a', 
u'i']
DEBUG - service - Raw key: u'n', modifiers: [], Key: u'n'
DEBUG - service - No phrase/script matched hotkey
DEBUG - service - Input stack at end of handle_keypress: [u'j', u'm', u'a', 
u'i', u'n']
DEBUG - service - Raw key: u'2', modifiers: [], Key: u'2'
DEBUG - service - No phrase/script matched hotkey
DEBUG - service - Input stack at end of handle_keypress: [u'j', u'm', u'a', 
u'i', u'n', u'2']
DEBUG - service - Raw key: ' ', modifiers: [], Key: ' '
DEBUG - service - No phrase/script matched hotkey
DEBUG - service - Script runner executing: Script('Java Main Script')
DEBUG - interface - Send special key: ['<backspace>']
DEBUG - interface - Send special key: ['<backspace>']
DEBUG - interface - Send special key: ['<backspace>']
DEBUG - interface - Send special key: ['<backspace>']
DEBUG - interface - Send special key: ['<backspace>']
DEBUG - interface - Send special key: ['<backspace>']
DEBUG - interface - Send special key: ['<backspace>']
ERROR - service - Script error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/autokey/service.py", line 403, in execute
    exec script.code in self.scope
  File "<string>", line 3, in <module>
  File "/usr/lib/python2.7/dist-packages/autokey/scripting.py", line 189, in input_dialog
    return self.__runKdialog(title, ["--inputbox", message, default])
  File "/usr/lib/python2.7/dist-packages/autokey/scripting.py", line 171, in __runKdialog
    p = subprocess.Popen(["kdialog", "--title", title] + args, stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1239, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
DEBUG - iomediator - Send via event interface
DEBUG - interface - Sending string: u' '
DEBUG - service - Input stack at end of handle_keypress: []
...
...

Original issue reported on code.google.com by philipp....@gmail.com on 23 May 2012 at 8:14