Re: osascript and Mac OS X v10.5.4
Re: osascript and Mac OS X v10.5.4
- Subject: Re: osascript and Mac OS X v10.5.4
- From: "Gignac, Jason (HAS-SAT)" <email@hidden>
- Date: Fri, 22 Aug 2008 16:36:03 -0500
- Thread-topic: osascript and Mac OS X v10.5.4
I guess I'm curious what it is you're trying to do, here... Are you trying
to make the installer pop up a dialog box to the user or something? IF so,
I'd submit at this point that that is a trademarked "Bad Idea" as it were.
Not that I can't imagine a sittuation where it would be useful, but it's not
the 'right' way to do it. Are you trying to let the user configure the
installation or something? If so, would it perhaps be more appropriate to do
it on the first run of the app?
On 8/22/08 Friday, August 22, 2008 -3:24 PM, "Francois Granade"
<email@hidden> wrote:
>
> I am having the same problem. I think it is new to 10.5.4, or even to
> a recent security update. I haven't tried with older versions of older
> versions of 10.5, but from googling the problem, it is only very
> recent...
>
> Also, I think it is specific to the Installer app -- otherwise, why
> would it work when "tell"-ing to a different application ?
>
> I haven't found a solution yet, except activating another application
> another application, displaying the dialog, and activating Installer
> again, like this:
>
> osascript<<EOF
> tell application "Finder"
> activate
> display dialog "Hello world !"
> end tell
> tell application "Installer"
> activate
> end tell
> EOF
>
> But it's ugly, from the point of view of the user... Any other idea ?
>
> François
>
>> Hi Stéphane,
>>
>> On 8/11/08 2:17 PM, "Stéphane Sudre" <email@hidden> wrote:
>>
>>>
>>> On Aug 11, 2008, at 10:31 PM, Luke Bellandi wrote:
>>>
>>>> Hi,
>>>>
>>>> I¹ve got a preflight script that executes AppleScript via
>>>> osascript. This works in Mac OS X v10.4, but not in 10.5.4
>>>>
>>>> An example is:
>>>>
>>>> osascript<<EOF
>>>> tell application "Installer"
>>>> activate
>>>> display dialog "Hello World"
>>>> end tell
>>>> EOF
>>>>
>>>> This doesn¹t work When run from Terminal.app, I get the failure
>>>> message:
>>>>
>>>> 49:77: execution error: Installer got an error: "Hello World"
>>>> doesn¹t understand the display dialog message. (-1708)
>>>>
>>>> But if I change the script to ³tell² a different application (I¹ve
>>>> tried Finder, Safari, Audio MIDI Setup) -- they all respond
>>>> appropriately and show the dialog. Why doesn¹t the Installer do it
>>>> in 10.5? This worked in 10.4 (and I believe even in earlier
>>>> versions of 10.5.4 could this have broken in the 10.5.3 or 10.5.4
>>>> update)?
>>>
>>> Stupid idea:
>>>
>>> Could it be related to the security fix for the AppleScript flaw?
>>>
>>> If it's the case, then the issue should also happen on a 10.4.11 OS
>>> fully patched.
>>>
>>
>> Ah -- it's not related to the security patch, but your suggestion
>> led me to
>> find out that on Leopard osascript disallows user interaction when
>> run from
>> a command-line tool. That's apparantly a behavior change from Tiger.
>>
>> Cheers,
>> Luke
>>
>>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Installer-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
m
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden