【问题标题】:Applescript and Flash BuilderApplescript 和 Flash 生成器
【发布时间】:2011-06-27 22:09:09
【问题描述】:

我正在尝试让 applescript 调整大小和移动 Flash Builder 的窗口,但我一直收到错误消息有人知道如何让 Eclipse 或 Flash Builder 与 applescript 很好地配合使用吗?

例如:

tell application "Adobe Flash Builder 4.5"
    activate
    set the bounds of the first window to {-1680, 650, 0, 1050}
end tell

返回此错误:

tell application "Adobe Flash Builder 4.5"
    activate
    set bounds of window 1 to {-1680, 650, 0, 1050}
        --> error number -1708
Result:
error "Adobe Flash Builder 4.5 got an error: Can’t set bounds of window 1 to {-1680, 650, 0, 1050}." number -10006 from bounds of window 1

或者也许有办法在 bash 中做到这一点? :)

【问题讨论】:

    标签: eclipse bash eclipse-plugin applescript flash-builder


    【解决方案1】:

    这里有两个错误代码:-1708-10006

    -1708 在尝试编写不可编写脚本的应用程序时抛出。 -10006 更通用,但在无法设置对象时出现;您可能无法通过脚本设置窗口的边界。您确定 Flash Builder 实际上是可编写脚本的吗?

    不管怎样,bash 在这里都帮不了你。如果应用程序不支持 Open Scripting Architecture,那么您几乎无能为力。

    【讨论】:

    • 那么我如何确定 Eclipse 或 Flash Builder 是否可编写脚本? :)
    • @gdoubleod:在 Applescript 编辑器中,转到菜单栏 > File > Open Dictionary... 并查找应用程序。如果未列出,您可以手动将编辑器指向它,但如果它不在显示的列表中,则可能无法编写脚本。
    【解决方案2】:

    正如@philipregan 提到的,这是因为该应用程序不可编写脚本。 要确定应用程序是否可编写脚本,请按照 Apple 提供的这些说明进行操作。

    要确定特定应用是否可编写脚本,请查看它是否具有脚本字典。见Opening a Scripting Dictionary

    Source

    【讨论】:

      猜你喜欢
      • 2014-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-03
      相关资源
      最近更新 更多