AppleScript的 - 在Opera JavaScript的执行 [英] AppleScript - JavaScript execution on Opera

查看:202
本文介绍了AppleScript的 - 在Opera JavaScript的执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Safari和Chrome可以通过AppleScript的执行JavaScript

Safari and Chrome can execute JavaScript via AppleScript

Safari浏览器:

tell application "Safari"
    open location "http://example.com"
    activate
    do JavaScript "alert('example');" in current tab of first window
end tell

铬:

tell application "Google Chrome"
    open location "http://example.com"
    activate
    execute front window's active tab javascript "alert('example');"
end tell

有没有办法在Opera做到这一点?

注:为Firefox同样的问题在这里:<一href=\"http://stackoverflow.com/questions/14383039/applescript-javascript-execution-on-firefox\">AppleScript - 在Firefox的JavaScript执行

我想过问他们在一起,但我决定让两个独立的问题,能够分别接受的答案。

推荐答案

没有,它似乎有一个Opera不一个AppleScript字典

No, it would seem that Opera does not have an AppleScript dictionary

根据本网站

歌剧(www.opera.com/download/)是一个快速,功能强大,而且价格昂贵($ 40)的Web浏览器。如果您正在寻找AppleScript的支持,停留很远; Opera有没有任何。

Opera (www.opera.com/download/) is a speedy, powerful, and expensive ($40) Web browser. If you're looking for AppleScript support, stay far away; Opera has none either.

这事实似乎被讨论这里支持。

That fact seems to be supported by the discussion here.

话虽这么说,你的可能的能够破解周围的限制(但它会非常难看)。

That being said, you might be able to hack around that restriction (but it will be very ugly).

根据这里

要间接达到歌剧(检查了V9.6)的快捷键是CTRL + SHIFT控制台+ I

To indirectly reach the Console in Opera (checked on v9.6) the shortcut is CTRL + SHIFT + I

我认为这是Windows的方式,但苹果可能只是<大骨节病>命令+ SHIFT + I

I think that is the Windows way, but Mac is probably just command + shift + i.

您获得歌剧是前窗,然后使用系统事件,开始输入。例如:

You get Opera to be the front window, then you use System Events to start typing. For example:

tell application "System Events"
    keystroke "l" using command down
    keystroke "c" using command down
end tell

(换句话说,你应该使用其他浏览器。)

(In other words, you should just use another browser.)

这篇关于AppleScript的 - 在Opera JavaScript的执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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