Re: How to get music list?

2008-08-04 Thread has
[[artists objectAtIndex: i] UTF8String], [[albums objectAtIndex: i] UTF8String]); } else printf("Current playlist is not available.\n"); [pool drain]; return 0; } HTH has [1] Which is a bit lik

Re: Cocoa / AppleScript Folder Action

2008-08-04 Thread has
John Joyce wrote: I know I can do awkward things with AppleScript and Folder Action scripts, but is there a strictly Cocoa/Objective-C way to do something like Folder Action scripts short of a daemon? Try kqueue or FSEvents. HTH has -- Control AppleScriptable applications from Python

Re: Learning Cocoa with RubyCocoa

2008-06-07 Thread has
the Apple engineer behind Leopard's Ruby support) which aims to make Ruby a full peer to ObjC for Cocoa development. The 0.2 release has just been announced: http://www.ruby-forum.com/topic/155593 HTH has -- Control AppleScriptable applications from Python, Ruby an

Re: What's the NSMailDelivery replacement for Leopard and Beyond?

2008-06-04 Thread has
On 5 Jun 2008, at 00:01, has wrote: What's wrong with third-party frameworks? To add to the list of third-party options, just ran across this blog post which names a couple more: http://vafer.org/blog/20080604120118 HTH has -- Control AppleScriptable applications from Python, Rub

Re: invoking quicklook via code

2008-06-04 Thread has
face is lagging its graphical one a bit these days.) HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reques

Re: NSAppleScript question

2008-06-04 Thread has
g."); else NSLog(@"Some error occurred: %@", error); // e.g. -1728, object not found [itunes release]; [pool drain]; return 0; } HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge

Re: What's the NSMailDelivery replacement for Leopard and Beyond?

2008-06-04 Thread has
rds-compatibility is an issue for controlling scriptable applications, then your choices are either to invoke AppleScripts via NSAppleScript or use objc-appscript (another third- party framework that is, shockingly, better than the Apple alternative). HTH has -- Control AppleScriptable

Re: Leopard (10.5+): Any Upper-Level (Cocoa) access to Mail?

2008-06-02 Thread has
guage in order to translate it back to ObjC. I'd suggest a copy of Matt Neuburg's "AppleScript: The Definitive Guide" as a programmer-friendly introduction to the beast. I'm also working on ObjC syntax support in ASTranslate (a very handy tool that converts AppleSc

Re: email

2008-06-01 Thread has
- lots of attachments in my work mailbox No messages found in ToDos No messages found in Notes No messages found in Outbox HTH has [1] Timing code (using appscript, natch): // #import "MLGlue/MLGlue.h" // To genera

Re: email

2008-06-01 Thread has
x27;s best not to use that tab for this), or to the Event Log History window (under the Windows menu) which gives you more control over what gets shown (select 'Log Nothing' for log messages only). HTH has -- Control AppleScriptable applications from Python, Ruby an

Re: ScriptingBridge to access Mail Messages?

2008-05-31 Thread has
ou can use to translate AppleScript commands to the equivalent appscript syntax - very handy when learning the latter). See my sig for links. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net __

Re: email

2008-05-28 Thread has
rdwire the import code for each mail client into their application, or implement it as as user-customisable plug-in system - but if they want specific recommendations they'll need to give more details. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://a

Re: How to tell if iTunes is running.

2008-05-24 Thread has
it] send]; while([itunes isRunning]) { printf("Waiting while iTunes quits...\n"); sleep(1); } NSLog(@"Is running: %i", [itunes isRunning]); [itunes release]; [pool release];

Re: Quit iTunes

2008-05-24 Thread has
]) { return QuitApplication("com.apple.itunes"); } For anything more complex, use a high-level bridge (e.g. see my sig). HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net _

Re: Setting iTunes album art with ScriptingBridge

2008-05-23 Thread has
on of it for future reference.) File bugs on iTunes' artwork APIs, and go jump up and down on the AppleScript team to spec this stuff properly so that application developers know what they're meant to do. Good point, but as the OPs have yet to respond, will leave that to

Re: Cocoa et al as HCI usability problem

2008-05-23 Thread has
would go a good way towards filling in that gap, and without the need to create whole new user-bases and community resources completely from scratch. Also worth noting for those that aren't already aware of it that Laurent Sansonetti, the Apple engineer behind Leopard's Ruby support

Re: Setting iTunes album art with ScriptingBridge

2008-05-23 Thread has
; cranky internals and then work back from there. e.g. I dragged a small PICT file, test.pict, onto iTunes to create an album cover, and then ran the following: #!/usr/bin/ruby require 'osax'; include OSAX; include Appscript d = osax.read(MacTypes::Alias.path('/Users/has/

Re: NSMailDelivery deliverMessage Deprecated

2008-05-23 Thread has
Nick Zitzmann wrote: On May 22, 2008, at 5:15 PM, Lorenzo wrote: Hi,I have just seen that the API [NSMailDelivery deliverMessage:... As been deprecated in Leopard. Is anyone know about a replacement? As has been mentioned, this framework is deprecated. I'd suggest using the Scri

Re: A directory site for open-source Cocoa components?

2008-05-22 Thread has
myself don't appreciate the services provided by such sites; it's just that the more of these sites we feel obliged to deal with in order to reach our audience, the more time we spend on administrating them when we'd rather be starting towards the next file release. HTH has -

Re: test if another app has hung

2008-04-01 Thread has
Martin Redington wrote: There were some AppleScript based approaches, but they all seemed to involve activating the app ... Shouldn't do, as long as you check to see if the application is running first. That said, you may not want to use AppleScript itself as it has issues runni

Re: Need for a creator code?

2008-04-01 Thread has
e the CF/NSBundle architecture instead. I think it may also useful when dealing with Apple Events. You can use creator codes in AEAddressDescs (see typeApplSignature), which are used to identify applications, though again there are newer alternatives (e.g. typeApplicationBundleID). HTH

Re: Exploring AppleScript APIs

2008-04-01 Thread has
e's worth of collective experience and code behind it, the AppleScript community is the primary source of knowledge and assistance for dealing with specific applications and related problems. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourcefo

Re: Appropriate interface element for representing a dropped file

2008-03-25 Thread has
or an example: /Developer/Applications/Utilities/FileMerge.app BTW, Studio questions are best directed to the AppleScript-Studio list: http://lists.apple.com/mailman/listinfo/applescript-studio HTH has -- Control AppleScriptable applications from Python, Ruby

Re: Garbage collection - was Beginner with Cocoa

2008-03-24 Thread has
http://trac.macosforge.org/projects/ruby/wiki/MacRuby has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: ScriptingBridgeConcepts problem

2008-03-15 Thread has
Script's behaviour as closely as possible (quirks and all), making it much more reliable. It also has a cleaner API, supports Panther onwards, and is MIT-licensed so you can freely include it in your application bundles for distribution. See my sig. for more info and links. HTH has

Re: [Moderator] iPhone discussion here - RETRACTION

2008-03-10 Thread has
Scott Anguish wrote: So we're back to the 'no iPhone discussion is allowed' state of things. #1 - The first rule of iPhone SDK is, you do not talk about iPhone SDK. #2 - The second rule of iPhone SDK is, you DO NOT talk about iPhone SDK. ... ___

Re: No track index in iTunes SB?

2008-03-10 Thread has
x27;s wonderfully elegant and concise when it does work. Then again, I'm old-school, and these days even I can't help feeling that Apple should just retire the AEOM as too complex for its own good, and go for a dumb and crude, but simple and reliable, IPC approach more along the l

Re: No track index in iTunes SB?

2008-03-10 Thread has
Christopher Nebel wrote: Anyone know how to get the index of the current iTunes track using Scripting Bridge? With Applescript, it's as simple as "tell iTunes to return index of current track", but iTunes SB has no such property (well, there is one, but it only refers to the

Re: No track index in iTunes SB?

2008-03-10 Thread has
slasktrattenator wrote: Anyone know how to get the index of the current iTunes track using Scripting Bridge? With Applescript, it's as simple as "tell iTunes to return index of current track", but iTunes SB has no such property (well, there is one, but it only refers to t

Re: Grabbing current Safari webpage url

2008-03-07 Thread has
Adam Leonard wrote: If you are looking to do it in Applescript (you want it to work in 10.4, for example) ObjC-appscript supports Panther onwards, and is MIT-licensed so you can freely include it in your application bundle for distribution. HTH has -- http://appscript.sourceforge.net

Re: Grabbing current Safari webpage url

2008-03-07 Thread has
NSLog(@"URL: %@", url); else NSLog(@"Error:\n%@", err); } else NSLog(@"Safari is not running."); [safari release]; [pool drain]; return 0; } HTH has -- http:

Re: Problems with ScriptingBridge and iTunes

2008-03-03 Thread has
(the Python and Ruby versions are particularly good for exploring application scripting since they can be used interactively and provide very nice built-in help). You'll still have to deal with the many quirks, bugs and other shortcomings of individual scriptable applications, but at l

Re: Problems with ScriptingBridge and iTunes

2008-03-03 Thread has
uation on its own terms and merely aims to provides you with a good, solid set of tools for dealing with it. It might not look quite as pretty or 'pure' as SB, but it shouldn't jump up and bite you on the butt when you aren't expecting it either. HTH has -- http://ap

Re: Problems with ScriptingBridge and iTunes

2008-03-02 Thread has
aboutappscripting.html For a more detailed discussion see the two PDF papers by William Cook (one of the original AppleScript designers) on the appscript links page: http://appscript.sourceforge.net/links.html Matt Neuburg's "AppleScript: The Definitive Guide"

Re: Problems with ScriptingBridge and iTunes

2008-03-02 Thread has
e a wrapper object of the class you need ('iTunesFileTrack') in order to find out the track's exact class and get its location if it's a file track. (Which, fortunately for SB, iTunes does; although there are some apps, e.g. Excel, that resolutely refuse to be specific.) No

Re: Problems with ScriptingBridge and iTunes

2008-03-02 Thread has
nt fileTrack]) { ASAlias *trackFile = [[[track location] get] send]; NSLog(@"%@", trackFile); } [itunes release]; [pool drain]; return 0; } HTH has -- http://appscript.sourceforge.net _

Re: Scripting Bridge & Mail

2008-02-29 Thread has
sourceforge.net/objc-appscript.html HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: how can I pass file ref in objc scripting bridge (trying to add track to iTunes)

2008-02-22 Thread has
vides fuller Cocoa-AE type mappings, more flexible parameter syntax, better application compatibility, 10.3+ support and various other advantages over SB. HTH has [1] The default text<->file coercion handlers all use HFS paths for legacy reasons. Personally I think Apple should

<    1   2