Warnings from Terminal and problems running an AppleScript with osascript
Warnings from Terminal and problems running an AppleScript with osascript
- Subject: Warnings from Terminal and problems running an AppleScript with osascript
- From: "Andrea \"XFox\" Govoni" <email@hidden>
- Date: Tue, 01 Aug 2006 19:05:30 +0200
I'm having some problems running a simple AppleScript through the
osascript command in a shell script. The only task of the script is to
close the Terminal.app window it is running into.
The shell script is:
<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.
The first time I launch the script (by double-clicking it) all works
fine, the script is executed by Terminal.app and closes the Terminal.app
window it is running into.
However, I notice the following errors in console.log:
<BEGIN CONSOLE ERRORS>
2006-08-01 17:30:22.067 Terminal[1287] .scriptSuite warning for
attribute 'properties' of class 'TerminalApp' in suite 'Terminal':
'NSAppleEventDescriptor' is not a valid type name.
2006-08-01 17:30:22.067 Terminal[1287] .scriptSuite warning for
attribute 'position' of class 'NSWindow' in suite 'Terminal':
'NSAppleEventDescriptor' is not a valid type name.
2006-08-01 17:30:22.068 Terminal[1287] .scriptSuite warning for
attribute 'properties' of class 'NSWindow' in suite 'Terminal':
'NSAppleEventDescriptor' is not a valid type name.
2006-08-01 17:30:22.068 Terminal[1287] .scriptSuite warning for
attribute 'bounds' of class 'NSWindow' in suite 'Terminal':
'NSAppleEventDescriptor' is not a valid type name.
2006-08-01 17:30:22.068 Terminal[1287] .scriptSuite warning for result
type of command 'doScript' in suite 'Terminal': the type NSString
('utxt') doesn't match the result Apple event code ('****').
<END CONSOLE ERRORS>
Then if I don't quit Terminal.app and try to relaunch the script,
Terminal.app becomes the frontmost application but the shell script
doesn't run.
If I quit and reopen Terminal.app the script runs fine one more time.
I'm going to report this behaviour to Apple.
Do you think it is a bug or am I missing something?
--
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