Reply
Thread Tools
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#1
Hey all.

I'm looking for an easy executable file that will send a CTRL-r signal to the tablet.

How could this be written?

Thank you!
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#2
I'm not sure if xautomation is available for the N810, but a simple script would be

Code:
#!/bin/sh
# Simple script to send a CTRL-R command

xte 'keydown Control_L' 'key r' 'keyup Control_L'
You would need to install xautomation first, then you just save the above script as (for example) controlplusr.sh and make this file executable by entering

Code:
chmod +x /path/to/file/controlplusr.sh
This needs to be performed as root.

There may be easier ways of achieving what you want. I'm not familiar with the N810, but there may already be a program available that will issue a custom command.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2011-04-01 at 23:37.
 

The Following 2 Users Say Thank You to marxian For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#3
Joy!

That worked!

Eep!
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#4
Okay. Last question.

What would the script look like that will automatically type this on the screen?

search
<Return Key>

Thanks again marxian!
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#5
Oh, c'mon, don't be so lazy
Just extrapolate the script:
xte 'key s'
xte 'key e'
....
:P
 

The Following User Says Thank You to maacruz For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#6
Wow.

My brain must seriously be leaking to not have seen that! *lol*
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#7
Nice thing xautomation
I have uploaded the xautomation package to extras-devel, so there is no need to search binaries around the forum
apt-get install xautomation
 

The Following 2 Users Say Thank You to maacruz For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#8
Thanks Mac!

Yeah, I really like xautomation.

It makes running macro scripts super easy.

I think I'm going to try using this with Tiny Fugue later this week and see how all that goes.
 
Addison's Avatar
Posts: 3,811 | Thanked: 1,151 times | Joined on Oct 2007 @ East Lansing, MI
#9
One more question... How can I do a super long string with this?

I have it as

[1|user@Nokia-N800-43-7|~]xte 'str "test"'
""X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 132 (XTEST)
Minor opcode of failed request: 2 (X_XTestFakeInput)
Value in failed request: 0x0
Serial number of failed request: 17
Current serial number in output stream: 32

I take it that I'm not using the format correctly?

Anyway, I would like xte to rifle off all of this at once:

javascript:isIE=/*@cc_on!@*/false;isIE ? swfHTML=document.getElementById('movie_player').ge tElementsByTagName('param')[1].value:swfHTML=document.getElementById("movie_play er").getAttribute("flashvars");w=swfHTML.split("&" );for(i=0;i<=w.length-1;i++)if(w[i].split("=")[0] == "url_encoded_fmt_stream_map"){links=unescape(w[i].split("=")[1]);break;}abc = links.split(",url=");for(i=0;i<=abc.length-1;i++){fmt=abc[i].split("|")[0];if ((fmt.indexOf("flv") > 0) && (fmt.indexOf("large") <= 0) && (fmt.indexOf("medium") <= 0)){if (fmt.indexOf("rl=") > 0){url = fmt.substring(4,fmt.indexOf("fallback_host")-1);url = unescape(unescape(url));break;}else{url = fmt.substring(0,fmt.indexOf("fallback_host")-1);url = unescape(unescape(url));break;}}}combineurl = url;combineurl = combineurl + '&title=' + ((((document.title.replace('#',' ')).replace('@',' ')).replace('*',' ')).replace('|',' ')).replace(':',' ');window.location.href = combineurl.substring(0, 2000);




Cheers!
 
Posts: 1,101 | Thanked: 1,184 times | Joined on Aug 2008 @ Spain
#10
Originally Posted by Addison View Post
One more question... How can I do a super long string with this?

I have it as

[1|user@Nokia-N800-43-7|~]xte 'str "test"'
""X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 132 (XTEST)
Minor opcode of failed request: 2 (X_XTestFakeInput)
Value in failed request: 0x0
Serial number of failed request: 17
Current serial number in output stream: 32

I take it that I'm not using the format correctly?

Anyway, I would like xte to rifle off all of this at once:

javascript:isIE=/*@cc_on!@*/false;isIE ? .....
xte "str 'test'" works for me, it throws the same error but it works, so the error can be ignored.
But.... xte "str test1" shows testq as result, because the "1" key is really the "q" key.
The correct command to get test1 is xte "str test" "keydown ISO_Level·_Shift" "str 1" "keyup ISO_Level3_Shift"
So you know now what task is to get that huge string
 

The Following User Says Thank You to maacruz For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 12:37.