On Sep 20, 2012, at 07:41, Scott Tirrell <[email protected]> wrote:
> Would anyone be able to help me with the proper syntax of changing this
> script to use the window's contents instead of the saved file's contents?
______________________________________________________________________
Hey Scott,
This should be in the ballpark.
-------------------------------------------------------
property phpref : "/usr/bin/php -l <<< "
try
tell application "BBEdit"
tell front text window
set winText to its text
end tell
end tell
do shell script phpref & quoted form of winText
beep
on error msg
set line_num to last word of msg
tell application "BBEdit" to tell front text window
select insertion point before line (line_num as integer)
end tell
end try
-------------------------------------------------------
'<<<' is the 'Here Strings' operator which lets you substitute a sting for
required file input.
I don't do php, so if it doesn't work send me a faulty bit of php code to test
with.
--
Best Regards,
Chris
--
--
You received this message because you are subscribed to the
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem,
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>