On Apr 1, 2009, at 8:15 PM, Ammar Ibrahim wrote:
I'm afraid I'm new and don't quite understand, do you recommend I
use appscript?
I'm biased, of course, but yeah, it's probably the best choice. It's
more powerful and reliable than Scripting Bridge, can be used in
background threads so
On Thu, Apr 2, 2009 at 12:07 AM, Bill Bumgarner b...@mac.com wrote:
On Apr 1, 2009, at 2:04 PM, ammar.ibrahim wrote:
Right now, I'm more confused than I was, hehe. My question is: Why would I
care about thread safety? Assuming that everytime I communicate with
iTunes
I create a thread and
On Thu, Apr 2, 2009 at 9:22 AM, Ammar Ibrahim ammar.ibra...@gmail.com wrote:
To sum up, you mean I should use osascript in a separate process? How can I
achieve that, and how can I have this separate process communicate back to
the main process?
NSTask creates child processes. The general
Michael Ash wrote:
On Tue, Mar 31, 2009 at 3:57 PM, Luca C. luca.pazzere...@gmail.com
wrote:
2009/3/31 Ammar Ibrahim ammar.ibra...@gmail.com
If I want to add a track to iTunes, I need to make sure iTunes is
responsive.
Are you sure it is that important? Actually, if you run an AS
script
On 4/1/09 12:25 PM, has said:
ObjC-appscript is almost entirely thread-safe. You'll need to watch
when using methods that rely on the Carbon Process Manager (some
initializers, -isRunning) as the PM APIs don't appear to be thread-
safe itself
Looking through Processes.h, it would appear that all
On Apr 1, 2009, at 3:57 PM, Sean McBride wrote:
On 4/1/09 12:25 PM, has said:
ObjC-appscript is almost entirely thread-safe. You'll need to watch
when using methods that rely on the Carbon Process Manager (some
initializers, -isRunning) as the PM APIs don't appear to be thread-
safe itself
On Wed, Apr 1, 2009 at 12:15 AM, Nate Weaver natewea...@xtechllc.comwrote:
On Mar 30, 2009, at 5:44 PM, Ammar Ibrahim wrote:
- It's known that if any dialog is open in iTunes it freezes any
communication through the scriptable interface, how can I detect that
and
put all my messages in
On Wed, Apr 1, 2009 at 2:25 PM, has hengist.p...@virgin.net wrote:
Michael Ash wrote:
On Tue, Mar 31, 2009 at 3:57 PM, Luca C. luca.pazzere...@gmail.com
wrote:
2009/3/31 Ammar Ibrahim ammar.ibra...@gmail.com
If I want to add a track to iTunes, I need to make sure iTunes is
responsive.
2009/4/1 Michael Ash michael@gmail.com
No, don't do this. AppleScript is not safe to use outside the main
thread. If you must run AppleScript asynchronously, either spawn a
subprocess to run it or, better yet, don't use AS at all but send
Apple Events in some other way, such as with
On Wed, Apr 1, 2009 at 10:21 PM, Luca C. luca.pazzere...@gmail.com wrote:
2009/4/1 Michael Ash michael@gmail.com
No, don't do this. AppleScript is not safe to use outside the main
thread. If you must run AppleScript asynchronously, either spawn a
subprocess to run it or, better
2009/4/1 Ammar Ibrahim ammar.ibra...@gmail.com
On Wed, Apr 1, 2009 at 10:21 PM, Luca C. luca.pazzere...@gmail.com wrote
I didn't realize the unsafety of NSAppleScript - so I have been quite
lucky, because my usage of applescript in non-main threads haven't caused
me
any problems.
On Apr 1, 2009, at 2:04 PM, ammar.ibrahim wrote:
Right now, I'm more confused than I was, hehe. My question is: Why
would I
care about thread safety? Assuming that everytime I communicate
with iTunes
I create a thread and have the communication happen from there,
even if it's
blocking and
2009/3/31 Ammar Ibrahim ammar.ibra...@gmail.com
My application will be adding/removing tracks to iTunes. I will not be
controlling playback or anything like that, it's mainly to manipulate the
database and playlists.
If you want that, you may want to use NSAppleScript.
If I want to add a
On Mar 30, 2009, at 5:44 PM, Ammar Ibrahim wrote:
- It's known that if any dialog is open in iTunes it freezes any
communication through the scriptable interface, how can I detect
that and
put all my messages in a queue, so that when iTunes is
responsive, I
can
send my messages?
On Tue, Mar 31, 2009 at 3:57 PM, Luca C. luca.pazzere...@gmail.com wrote:
2009/3/31 Ammar Ibrahim ammar.ibra...@gmail.com
If I want to add a track to iTunes, I need to make sure iTunes is
responsive.
Are you sure it is that important? Actually, if you run an AS script wich,
say, opens with
I'm currently developing an App in iTunes, and I'm new to Cocoa and the
entire Mac development world. So far, things are looking great. I have few
questions, about which is the best strategy to follow in order to accomplish
some tasks. This is a special purpose app, in a controlled environment.
*
Hi Ammar,
2009/3/30 Ammar Ibrahim ammar.ibra...@gmail.com
I'm currently developing an App in iTunes, and I'm new to Cocoa and the
entire Mac development world. So far, things are looking great. I have few
questions, about which is the best strategy to follow in order to
accomplish
some
For issue 1: I use NSWorkspace to handle this. Someone more knowledgeable
than me might be able to answer your more detailed questions. When I launch
my app, I check the sharedWorkspace to see if com.apple.iTunes is already
running. If not, I launch it.
For issue 2: There is a nifty framework
* Communcation with iTunes
- What's the best interface to use?
There are many approaches but if you don't tell us what are your purposes
we
can't tell you wich approach is the best for your use. However, i suggest
googling for ScriptingBridge.
My application will be
19 matches
Mail list logo