Re: Warnings from Terminal and problems running an AppleScript with osascript
Re: Warnings from Terminal and problems running an AppleScript with osascript
- Subject: Re: Warnings from Terminal and problems running an AppleScript with osascript
- From: "Andrea \"XFox\" Govoni" <email@hidden>
- Date: Thu, 03 Aug 2006 09:45:18 +0200
Doug McNutt ha scritto:
>> <BEGIN SHELL SCRIPT>
>> #!/bin/sh
>> osascript -e 'tell application "Terminal" to close window 1'
>> <END SHELL SCRIPT>
>> I saved the script in a file with .sh extension, set the execution bit
>> on the file and told the Finder to open it with Terminal.app.
> 1) The extension for a file that OS neXt will recognize as
> something for Terminal.app is .command
Ok, but this isn't the point.
However, it behaves the same even if I put the script in a .command file.
> 2) You are asking Terminal,app to execute a command in a new
> window - er shell - which it will open for the purpose.
> Terminal.app probably has trouble understanding what you mean
> by window 1. The one it just opened for you?
Yes, I found Terminal.app always names the frontmost window as 1, so
(without human interference) it refers to the window where the script is
running in.
> What happens when you execute the .sh executable from something
> other than Terminal.app? Do shell script or a BBEdit worksheet
> for instance?
I don't use BBEdit so I cannot test with it but with some more tests I
found that *any* AppleScript command I send to Terminal.app causes it to
print the warnings and inhibits the execution of any file associated
with it.
For example, if I run the
tell application "Terminal" to activate
script in Script Editor.app, Terminal.app won't be able to execute any
.command, .term or any file associated with it without an application
restart.
So, I think the bug could be narrowed down to something like:
"Terminal.app stops executing any file associated with it after it
receives an AppleScript command."
I think this is clearly a bug,
any confirms before I submit it?
--
Andrea "XFox" Govoni
AIM/iChat/ICQ: email@hidden
Yahoo! ID: xfox82
Skype Name: draykan
PGP
KeyID: 0x212E69C1
Fingerprint: FBE1 CA7D 34BE 4A53 9639 5C36 B7A0 605F 212E 69C1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden