Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use easystroke for many tasks like command, key combination, etc. Now, I need to perform a series of tasks in a single stroke.

For example:

First i need to execute the command 'cryptkeeper'.

Second, I need to execute 'gnome-terminal'.

Third, I need to press key combination "ctrl+c".

Fourth, i need to press 'up-arrow'. Then 'Enter'

...

Here, i need to do step 1 to 4 with a single stroke in Easystroke.

Is there any way to do this ??

share|improve this question

2 Answers 2

up vote 1 down vote accepted

DISCLAIMER: I'm not sure if this will work, and I am can't test it now, but try it.

Install xte: sudo apt-get install xautomation

In easy-stroke make sure "Type" is set to "Command", then in the "Details" field put:

cryptkeeper && gnome-terminal && xte 'keydown Control_L' 'keydown C' 'keyup Control_L' 'keyup C' 'key Up' 'key Return'

In the end, it should look something like this

enter image description here

share|improve this answer
    
Thanks for the response..Your answer helped me upto some extend. The code you provided will not work as in a single line..So, I added them to a shell script and invoked using a specified gesture. Thanks again for introducing me XTE. –  001neeraj Dec 26 '12 at 5:56
1  
@001neeraj Could you post an answer detailing what you did? This way other poeple can do it as well? Thanks! –  Seth Jan 11 '13 at 19:22
1  
forgive me for the delay in reply. I've answered the way i did it. –  001neeraj Apr 19 '13 at 7:56

enter image description here

Where secret.h is:

#!/bin/bash
cryptkeeper&
gnome-terminal -e "gnome-panel"&
xte 'sleep 5'
xte 'keydown Control_L' 'key c' 'keyup Control_L'
xte 'sleep 5'
gnome-terminal -e "gnome-panel"&

I am posting this because it may be useful to some others by editing the code. 'xdotool' can be used instead of xte.

share|improve this answer
1  
Thank you for sharing! Hmm, I think this is equivalent to replacing the following command line in Seth's answer: cryptkeeper & gnome-terminal & xte 'sleep 5' ; xte 'keydown Control_L' 'key c' 'keyup Control_L' ; xte 'sleep 5' ; gnome-terminal -e "gnome-panel" & Note that a && b will start b when a has finished successfully, a ; b will start b when a has finished, a & b starts both simultaneously. –  ignis Apr 19 '13 at 8:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.