• 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: run script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run script


  • Subject: Re: run script
  • From: has <email@hidden>
  • Date: Fri, 26 Oct 2001 13:53:15 +0100

Bob Kalbaugh wrote:

>> The following script allows you to type in one or more lines of script by
>> using semi-colons to indicate returns (since you can't use returns in the
>> dialog), eg:
>
>(SNIP)
>
>> has
>
>
>Ahh, but you can use returns in a dialog box. You just need to use the enter
>key to dismiss the box, or of course click the button. example:
(snip)

Hi Bob

That's a neat trick(/feature/bug?). Revised version of script below.

has

======================================================================

property yourDelim : ";" --character used to break statements

set r to return
set rr to (r & r)
set rrr to (rr & rr & rr)

try
set Dialogue_2 to display dialog "Type formula" default answer
[NO-BREAK](rrr & rr)

--trap error if user clicks "Cancel"
on error errorMsg
error errorMsg
end try

set Formula to text returned of Dialogue_2

try
set total to (run script Formula)

--trap any errors in processing script
on error errorMsg
error errorMsg & return & return & Formula
end try

display dialog total buttons {"OK"} default button 1

======================================================================
[formatted using ScriptToEmail - less than 3 proud users to date:p]
[http://files.macscripter.net/ScriptBuilders/ScriptTools/ScriptToEmail.hqx]


  • Prev by Date: Re: Set the time in 8.1 and 7.6 remotely?
  • Next by Date: Re: Recommendations for AppleScript Formatting
  • Previous by thread: Re: run script
  • Next by thread: mounting volumes using TCP/IP
  • Index(es):
    • Date
    • Thread