• 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 OS X Application...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tell OS X Application...


  • Subject: Re: Tell OS X Application...
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 10 Jan 2002 10:26:57 -0800

On 1/10/02 9:23 AM, "Simon Forster" <email@hidden> wrote:

>> Please
>> provide the 9 lines. That's awfully short, you know, and would make it
>> possible to see if there's any way to make it more "elegant", whereas
>> without them we're just stumbling in the dark.
>
> I try to avoid posting scripts 'cause they end up looking like a dogs
> dinner but seeing as you asked:
>
> <script snippet>
> ---------------------
> tell application "Finder"
> set my_file to ((desktop as string) & "vebraproperties.txt")
> set my_app to ((name of startup disk as string) &
> ":System:Library:ScriptingAdditions:URL Access Scripting.app:")
> end tell
> with timeout of 300 seconds
> using terms from application "URL Access Scripting"
> tell application my_app to download
> "ftp://username:password@server_ip/WEBSITE7/vebraproperties.txt"; to file
> my_file replacing yes
> end using terms from
> end timeout
> ---------------------
> </script snippet>

Given that you want to be able to use the script on other machines, that
seems to me to be exactly how to do it. It seems pretty elegant to me
compared to how we used to have to do it with raw codes pre OS 9. Since
you'll be using it only in OS X (otherwise the script won't work at all)
you're safe with 'using terms from'. What you could do if you wish is:

set my_app to ((path to scripting additions folder from System domain as
string) & "URL Access Scripting.app")

which is somewhat neater.

--
Paul Berkowitz


  • Follow-Ups:
    • Re: Tell OS X Application...
      • From: Simon Forster <email@hidden>
    • Re: Tell OS X Application...
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Tell OS X Application... (From: Simon Forster <email@hidden>)

  • Prev by Date: RE: running applscripts from a cron file
  • Next by Date: By nice to the Windows user come to AppleScript please :-)
  • Previous by thread: Re: Tell OS X Application...
  • Next by thread: Re: Tell OS X Application...
  • Index(es):
    • Date
    • Thread