• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: tell darwin
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tell darwin


  • Subject: Re: tell darwin
  • From: garbanzito <email@hidden>
  • Date: Sat, 4 May 2002 22:24:46 -0600

at 2002 05 03, 19:57 -0700, they whom i call Philip Aker wrote:
tell darwin
...
...
...
end tell

you more or less can do this, if you think of quoting as a substitute for a
tall block. this would work:

do shell script "
ls -al
pwd
"
except the Mac line ends in the string aren't incompatible
with the shell. (did 1.8.2b3 change this?). so you can get
around it like this:

do shell script "#
\n ls -al #
\n pwd
"

which comments out the Mac line ends and adds unix line
ends. or make it more readable by dealing with the line ends
in a handler:

do_shell ("
ls -al
pwd
")

on do_shell (the_commands)
do shell script "echo " & the_commands & " | tr '
' '\\n' | sh -s"
end do_shell

--
steve harley email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >tell darwin (From: Philip Aker <email@hidden>)

  • Prev by Date: [ANN] MacTech Article source posted
  • Next by Date: Class/Properties syntax baffles me
  • Previous by thread: Re: tell darwin
  • Next by thread: Re: More newbie queries: paths
  • Index(es):
    • Date
    • Thread