Rudimentary MPW simulation with Xcode script
Rudimentary MPW simulation with Xcode script
- Subject: Rudimentary MPW simulation with Xcode script
- From: Daniel Jalkut <email@hidden>
- Date: Tue, 24 May 2005 13:48:22 -0700
I have been messing with Xcode today, and I got the idea that it
wouldn't be hard to roughly approximate MPW's "inline execution"
behavior by defining a script to simply execute the selection.
It's pretty rough, and doesn't handle anything like multiple lines of
commands, but it's kind of fun to be able to run arbitrary commands
from within a document again.
I thought I'd post it in case anybody is interested in it as a
novelty or starting point for a more robust implementation:
#! /usr/bin/perl -w
#
# -- PB User Script Info --
# %%%{PBXName=Execute Selection}%%%
# %%%{PBXInput=Selection}%%%
# %%%{PBXOutput=InsertAfterSelection}%%%
# %%%{PBXKeyEquivalent=@}%%%
#
my $outputString = "";
my @selection = <STDIN>; # read the selection from standard input
if (!@selection) { return; }; # no chars in selection, nothing to do
print "\r\n";
my $err = system(@selection);
if ($err != 0)
{
print "error: " . $err . "\r\n";
}
_______________________________________________
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