编程启动在Linux / X11独立的Adobe Flash插件 [英] Programmatically launching standalone Adobe flashplayer on Linux/X11

查看:263
本文介绍了编程启动在Linux / X11独立的Adobe Flash插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的独立版本的Adobe Flash不带任何参数的时候比你在命令行启动它一个.swf文件等。我需要的球员去全屏幕,没有窗口边框和等。这可以通过按Ctrl + F键,一旦程序启动来完成。我想这样做编程,因为我需要它发射到全屏显示,无任何人工交互。

我的猜测是,我需要一些如何得到一个处理窗口,然后把它看起来像Ctrl + F键击事件。

如果这有什么差别,它看起来像flash播放器是一个GTK应用程序,我有Python和PyGTK的安装。

更新(我用的解决方案......感谢ypnos的回答):

  ./版本的Adobe Flash http://example.com/example.swf和放大器;睡眠3及及放大器; 〜/ xsendkey -window的Adobe Flash Player 10控制+ F
 

解决方案

您可以使用专用的应用程序,它发送键击到窗口管理器,它应该然后将它传递给闪烁,如果窗口开始作为活动窗口上屏幕。这是很容易出错,不过,由于启动闪光灯,当窗口将出现之间的延迟。

例如,您的脚本可以做这样的事情: 版本的Adobe Flash * .swf文件 睡眠3及及放大器; xsendkey控制+ F

应用程序xsendkey可以在这里找到: HTTP://people.csail。 mit.edu/adonovan/hacks/xsendkey.html 没有给出一个特定的窗口,将其发送到根窗,这是由窗口管理器处理。您也可以尝试先弄清楚窗口ID,使用xprop或相关的东西吧。

另一种选择是一个窗口管理器,它能够记住您的设置,并自动应用它们。 Fluxbos例如提供了这个功能。您可以设置的Fluxbox使窗口的装饰少和伸展它在整个屏幕上,如果版本的Adobe Flash支持被调整。这也是不太好的,因为它可能会影响到所有版本的Adobe Flash窗口打开过。

The standalone flashplayer takes no arguments other than a .swf file when you launch it from the command line. I need the player to go full screen, no window borders and such. This can be accomplished by hitting ctrl+f once the program has started. I want to do this programmatically as I need it to launch into full screen without any human interaction.

My guess is that I need to some how get a handle to the window and then send it an event that looks like the "ctrl+f" keystroke.

If it makes any difference, it looks like flashplayer is a gtk application and I have python with pygtk installed.

UPDATE (the solution I used... thanks to ypnos' answer):

./flashplayer http://example.com/example.swf & sleep 3 && ~/xsendkey -window "Adobe Flash Player 10" Control+F

解决方案

You can use a dedicated application which sends the keystroke to the window manager, which should then pass it to flash, if the window starts as being the active window on the screen. This is quite error prone, though, due to delays between starting flash and when the window will show up.

For example, your script could do something like this: flashplayer *.swf sleep 3 && xsendkey Control+F

The application xsendkey can be found here: http://people.csail.mit.edu/adonovan/hacks/xsendkey.html Without given a specific window, it will send it to the root window, which is handled by your window manager. You could also try to figure out the Window id first, using xprop or something related to it.

Another option is a Window manager, which is able to remember your settings and automatically apply them. Fluxbos for example provides this feature. You could set fluxbox to make the Window decor-less and stretch it over the whole screen, if flashplayer supports being resized. This is also not-so-nice, as it would probably affect all the flashplayer windows you open ever.

这篇关于编程启动在Linux / X11独立的Adobe Flash插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆