在特定OS X空间中运行不同的Firefox配置文件

时间:2011-02-28 11:22:38

标签: macos firefox shell applescript osx-snow-leopard

我想知道在applescript中是否可以创建一个结果出现在特定空格数N中的脚本。

我发现因为我一次打开了很多Firefox窗口,所以让每组窗口都是自己的身份并在特定的空间中打开会很好。例如,社交网络和电子邮件1,VPN on 2,iTunes on 3,在线视频5,汽车研究6等等。

目前,我使用AppleScript将配置文件名称绑定到Firefox调用:

do shell script "/Applications/Firefox.app/Contents/MacOS/firefox-bin -no-remote -P " & (ASCII character 34) & "Music Stuff" & (ASCII character 34) & " http://www.mymusicweb.com/ &"

在这里,我想为Space 7创建一个窗口,调用“Music Stuff”配置文件并初始化窗口以显示My Music Web网站。

问题是,我如何才能使它只出现在Space 7中。

我尝试使用Spaces对话框,但是当我选择AppleScript可执行文件时,它只是作为FSlauncher出现,并且每个AppleScript都出现为FSlauncher ,因此我无法将它们分配到不同的空间。同样,如果我使用Ned Deily的例子:

  

在OS X 10.5或10.6中,Spaces   可以访问分配和   通过脚本化界面进行了更改   到System Events.app:

tell application "System Events"
    set x to application bindings of spaces preferences of expose preferences
    set x to {|com.apple.textedit|:4} & x  -- Have TextEdit appear in space 4
    set application bindings of spaces preferences of expose preferences to x
end tell If you don't already know it,
     

您可以从Finder获取应用程序的软件包ID:

tell application "Finder"
    get id of application file "TextEdit" of folder "Applications" of startup disk
end tell

我发现所有脚本都提供了 aplt 的ID,现在再次区分!

有没有其他人有想法?

谢谢!

1 个答案:

答案 0 :(得分:1)

认为我有类似的问题。我希望在空格中显示一个单独的Firefox窗口,但afloat和其他黑客不能与Firefox一起使用。所以我搞砸了并且有所作为,如果你感兴趣,请看看https://github.com/wader/firefox-all-spaces。最简单的可能是将整个回购下载为拉链并按照说明进行操作。

相关问题