需要选取屏幕区域坐标

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

需要选取屏幕区域坐标

#1

帖子 eexpress » 2007-09-15 18:16

似乎没什么软件可以。就像import截图那样,仅仅需要选取区域的尺寸坐标。

写一个监视xev的脚本?在fvwm下。xev都输出不正常。读import源码?已经看晕了。xrandr?不知道是什么。gtk调用iconview的abi?剩下读xev源码了。

谁知道,赶紧说说。

通俗点描述需要。
执行一个东西。鼠标变+字,选择一个屏幕区域。结束。输出geometry。
上次由 eexpress 在 2007-09-24 12:21,总共编辑 1 次。
● 鸣学
头像
86Ubuntu
帖子: 369
注册时间: 2006-12-21 17:54
联系:

#2

帖子 86Ubuntu » 2007-09-15 18:57

支持一下

代码: 全选

 
传说中,他有着绝对精彩和浪漫的身手
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#3

帖子 eexpress » 2007-09-16 19:38

tab补全了x命令。一个一个看。蛮多惊喜的。

xmag xli xlito xrandr 取屏幕,放大的。测试X参数的。什么都有。看晕了。
● 鸣学
头像
drivel
帖子: 1918
注册时间: 2006-07-08 9:21
来自: University of Science and Technology Beijing
联系:

#4

帖子 drivel » 2007-09-24 11:20

Kubuntu下的默认带的截图软件可以选择区域,不知道是不是import做back的
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#5

帖子 eexpress » 2007-09-24 11:37

哦。我是要CLI的,可以输出这个geometry参数的。要调用到recordmydesk。
import是独立软件呢。
● 鸣学
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

#6

帖子 bones7456 » 2007-09-24 11:48

ee一天到晚在捣鼓些啥玩意啊?
顺便问个问题,纯文本界面下有办法截图没?
关注我的blog: ε==3
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#7

帖子 eexpress » 2007-09-24 12:07

tty下有。我用过的不是截屏,是鼠标截文字的,都不记得发过帖子没。谁谁说过有截图片的。tty下,搞这个,太生僻了啊。
● 鸣学
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

#8

帖子 bones7456 » 2007-09-24 12:18

呃,那先告诉我,tty下怎么启用鼠标....
关注我的blog: ε==3
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#9

帖子 eexpress » 2007-09-24 12:19

☎ aw gpm
软件包: gpm
状态: 未安装
版本号: 1.19.6-23build1
优先级: 可选
部分: universe/misc
维护者: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
未压缩尺寸: 676k
依赖于: libc6 (>= 2.5-0ubuntu1), debconf (>= 0.5) | debconf-2.0, debianutils (>=
1.7), ucf (>= 0.28), lsb-base
描述: General Purpose Mouse Interface
This package provides a daemon that captures mouse events when the system
console is active, and delivers events to applications through a library.

The default when no application is running is to emulate "selection", that is,
to allow cut-and-paste with the mouse on the console the same way as it is done
under X.
● 鸣学
头像
bones7456
帖子: 8495
注册时间: 2006-04-12 20:05
来自: 杭州
联系:

#10

帖子 bones7456 » 2007-09-24 12:29

恩,学习了,回去实验下...哈哈
关注我的blog: ε==3
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#11

帖子 eexpress » 2007-09-24 13:16

代码: 全选

☎  cat srecord.bash 
#!/bin/bash

xwininfo >tmp 
w=`grep Width tmp`; w=${w#*:}; 
h=`grep Height tmp`; h=${h#*:}; 
x=`grep 'Absolute.*X' tmp`; x=${x#*:}; 
y=`grep 'Absolute.*Y' tmp`; y=${y#*:}; 
NOW=`date '+%Y-%m-%d-%H-%M-%S'` 
[ $x -lt 1 ] && x=1;
[ $y -lt 1 ] && y=1;
s="recordmydesktop -x $x -y $y -width $w -height $h -o ${NOW}.ogg" 
echo $s 
read ok
echo execute now
eval $s
找不到了。没办法了。出一个ugly的方法。放好一个窗口,执行bash,点窗口,移开窗口,回终端按下回车,开始录制。

@@@@@@@@@@@@@@@@@@@@@@@啊。
● 鸣学
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#12

帖子 eexpress » 2007-09-24 15:02

其实有这样的。

ffmpeg can also grab the screen
2007-08-11 20:54:00 AndresVia [Reply | View]
As of version 3 (2007-AGO-01) ffmpeg can grab from X11.
From the man page:
ffmpeg -f x11grab -s cif -i :0.0 /tmp/out.mpg
Which is a *lot* easier.

vnc2swf creates flash movies from vnc streams.
vncrec records vnc sessions for later playback to a vnc client, but there is a 'transcode' plugin for vncrec files which allow conversion to movie formats (theres even a movie showing this done).

xvidcap没multi-frame功能了。ffmpeg都有安装。还有时崩溃。
附件
Grab.gif
Grab.gif (10.76 KiB) 查看 2638 次
● 鸣学
myst_tt
帖子: 28
注册时间: 2007-09-18 22:31

#13

帖子 myst_tt » 2007-09-30 0:42

是说和 command: xwininfo
相似的功能么? 额外要作的是鼠标截取一个区域
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#14

帖子 eexpress » 2007-09-30 9:27

就是那xgrab的功能。有人写了这个功能,在一个工具内部调用。1楼是要求。 :lol:
其实,可以从scrot里面剔出来的。那源码看了。只是奇怪,没现成的?
● 鸣学
回复