Re: NSAppleScript no longer allows user interaction?
Re: NSAppleScript no longer allows user interaction?
- Subject: Re: NSAppleScript no longer allows user interaction?
- From: Renaud Boisjoly <email@hidden>
- Date: Mon, 14 Aug 2006 14:34:45 -0400
Thanks for the idea Matt, but in this case, I'm not sure what the
target app would be... my app runs in the background and launches
AppleScripts stored in files when certain events occur. And I'm not
sure why this is happening. Before a script like:
display dialog "Something happened" buttons {"Ok"} default button 1
would work... but now, I need to use "tell" to an application for
this to work. I could tell the Finder to activate then send the
message, but this means the Finder will always be in front when this
script runs, and all current scripts have to be modified to activate
the Finder before displaying a dialog, but for some scripts, this
might not be appropriate.
I'm wondering if something has changed or if there is some parameter
I can use to allow these scripts to run and interact with users.
- arby
Le 06-08-14 à 13:49, Matt Neuburg a écrit :
Hi all
I've been using NSAppleScript's executeAndReturnError method to run
various scripts from within my app. It has been working for years and
now, it seems broken on my MacBook Pro.
As I try to migrate to a Universal code base, it seems that I can no
longer run scripts which try to interact with the user. If I do, I
get a "No user interaction allowed" error.
I'm just trying to have a script use the "Display Dialog" command to
let the user know of something. It used to work, but now it doesn't.
If I modify the AppleScript to talk to a specific app, it works, but
that app's icon bounces in the Dock to let me know. Not fun... not
what I'd like to happen and not what used to happen.
Tell the target app to activate before telling it to display
dialog. m.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden