Re: Front window dirty
Re: Front window dirty
- Subject: Re: Front window dirty
- From: Shane Stanley <email@hidden>
- Date: Fri, 24 Oct 2014 10:56:11 +1100
On 23 Oct 2014, at 11:28 pm, Jeremy Roussak <email@hidden> wrote:
> I had a vague idea that ASObjC might allow me to do what I wanted.
This is probably a good excuse to talk about what ASObjC can and can't do.
ASObjC gives you access to the Cocoa frameworks, which means most of the stuff used to write a typical application. But that doesn't mean you can access Cocoa objects belonging to other applications. The only time you can do that is if your script is being run by the application -- so you can probably do all sorts of stuff in a script editor, for example, and in apps with their own script menus (assuming they are using the old way of running their scripts).
Really, there are four broad uses for ASObjC. One is for manipulating data. So you can modify text, do regular expression stuff, sort lists, format numbers and dates, parse XML, etc. The second is for essentially bypassing apps -- doing things that you might otherwise need to use apps for. That covers stuff like dealing with files (moving/copying/deleting, etc), through to things like reading and writing styled .rtf documents directly. The third is dealing with some system-level things, like listening for notifications, and querying various system settings. And the fourth is building interfaces. You normally do that in Xcode, but you can also do it in vanilla ASObjC -- for example, if you wanted an open dialog that allowed choosing of both files and folders, or perhaps alias files without resolving them.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden