开发者

Apple script : Can instruments tool be controlled using apple script

开发者_如何学Go

I'm exploring some things on apple script to control Instruments tool

Need help on this. I know "Finder" can be controlled, but still not successful on controlling instruments.

Can anyone please help me on this ?

-Thanks Kiran


The way to tell if an application is AppleScriptable or not is to attempt to open its scripting dictionary with AppleScript Editor. To do so, open AppleScript Editor, and choose "File > Open Dictionary", or hit ⇧⌘O. You can then choose any application by name, or, if the application you want doesn't show up there, click "Browse…" and navigate to wherever the application lives. If the application is greyed out or won't open, it's not AppleScriptable.

In this case, Instruments doesn't show up in the list for me, so I browsed to /Developer/Applications/; there, Instruments is greyed out, so it looks like it's not AppleScriptable. Your best bet is either to use GUI scripting, which is not ideal, or look into running DTrace scripts from the command line. Unfortunately, I know nothing about DTrace, so I can't give you advice there; nor do I know anything about Instruments, so it's possible that this option isn't enough (although I think it is).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜