FROM : Matt Neuburg
DATE : Mon Aug 14 23:02:21 2006
On Mon, 14 Aug 2006 14:34:45 -0400, Renaud Boisjoly <<email_removed>> said:
>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.
I don't have an Intel box, and it works fine on my PPC box under 10.4.7. If
you see differing behavior on Intel and PPC and you think this is a bug,
file it. m.
--
matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
DATE : Mon Aug 14 23:02:21 2006
On Mon, 14 Aug 2006 14:34:45 -0400, Renaud Boisjoly <<email_removed>> said:
>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.
I don't have an Intel box, and it works fine on my PPC box under 10.4.7. If
you see differing behavior on Intel and PPC and you think this is a bug,
file it. m.
--
matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
| Related mails | Author | Date |
|---|---|---|
| Renaud Boisjoly | Aug 14, 16:49 | |
| Matt Neuburg | Aug 14, 19:49 | |
| Renaud Boisjoly | Aug 14, 20:34 | |
| Stephen Deken | Aug 14, 22:09 | |
| Matt Neuburg | Aug 14, 23:02 |






Cocoa mail archive

