Is there a way to assign shortcut to applescript that can control tabs on Xcode 4 ? Something like this works for Safar开发者_如何转开发i, but not Xcode 4 :
try
tell front window of application "Xcode" to set current tab to tab 1
on error
tell front window of application "Xcode" to set current tab to last tab
end try
(I have an error : A property can’t go after this identifier.
)
I know I can switch tabs with cmd-}
, I want to be able to go to a tab by its number
Because Xcode 4 is so young, the Applescript dictionary is basically empty. You may have to wait for Xcode 4.1 or 4.2 before you can do any kind of complicated scripting.
I would file a radar bug if this is really important to you. It's like voting. If you are lucky enough to have a WWDC ticket, make sure to mention it to all the apple engineers you meet there.
Xcode 4 was an ambitious redesign. In an effort to ship, quite a few features got cut (applescript, user scripts being the more glaring). I would expect them to make a comeback over time, but you need to make your needs known.
精彩评论