Re: saving front window using osascript...
Re: saving front window using osascript...
- Subject: Re: saving front window using osascript...
- From: Fons Rademakers <email@hidden>
- Date: Thu, 08 Nov 2007 10:51:58 +0100
- Keywords: CERN SpamKiller Note: -51 Charset: west-latin
- Organization: CERN
Hi Rick,
many thanks that help, to use "document". However, what I try to achieve
is to have a user script that:
- strips all trailing blanks and tabs from a file
- saves the file
I tried:
- Input: "Entire Document"
- Directory: "Home Directory"
- Script:
#!/bin/sh
#
# Removes trailing blanks (spaces and tabs) from the file + save.
#
perl -pe 's/[\t ]+$//g' <&0
osascript << ENDOFSCRIPT
tell application "Xcode"
save the front document
end tell
ENDOFSCRIPT
but this does not work as the save is of the document before the perl
modified text is pasted in. How can I make such a two step script?
Cheers, Fons.
Rick Ballard wrote:
On Nov 7, 2007, at 5:02 PM, Fons Rademakers wrote:
Hi,
something very trivial. I want to save the Xcode front window via
osascript:
tell application "Xcode"
save front window
close front window
end tell
only closes but does not save the window. What script command should I
use? write to file? If so how do I get the type?
tell application "Xcode"
close front document saving <yes/no/ask>
end tell
- Rick
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: email@hidden Phone: +41 22 7679248
WWW: http://fons.rademakers.org Fax: +41 22 7669640
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden