• 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: Download dmg and then mount the volume ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Download dmg and then mount the volume ?


  • Subject: Re: Download dmg and then mount the volume ?
  • From: John Stewart <email@hidden>
  • Date: Mon, 31 Jan 2005 20:11:25 -0500

On 01/31/05 at -0800 Graham Anderson said this

>is this what you meant?
>the below script gave me the error:
>'File file:///Users/robert/Desktop/Fonovisa.dmg wasn't found.'
>
>--------------
>--defines
>set gbaseURL to "http://www.siren.cc/Univision/fonovisa/Library/nsis/";
>set gFonovisaDMG to ((path to desktop as Unicode text) & "Fonovisa.dmg")
>
>-- download the dmg file with curl
>set the_command to "curl " & gbaseURL & "Fonovisa.dmg" & " -o " &
>quoted form of POSIX path of gFonovisaDMG
>do shell script the_command
>
>mount volume ("file://" & POSIX path of gFonovisaDMG as alias)
>-------------
>
>I also tried moving the 'as alias'
>which gives the error: An error of type -36 has occurred.
>
>--------------
>--defines
>set gbaseURL to "http://www.siren.cc/Univision/fonovisa/Library/nsis/";
>set gFonovisaDMG to ((path to desktop as Unicode text) & "Fonovisa.dmg"
>as alias)
>
>-- download the dmg file with curl
>set the_command to "curl " & gbaseURL & "Fonovisa.dmg" & " -o " &
>quoted form of POSIX path of gFonovisaDMG
>do shell script the_command
>
>mount volume ("file://" & POSIX path of gFonovisaDMG)
>--------------
>
>
>On Jan 31, 2005, at 8:06 AM, John Stewart wrote:
>
>> On 01/30/05 at -0800 Graham Anderson said this
>>
>>> set gFonovisaDMG to ((path to desktop) & gtheVolume as text)
>>
>>
>> In this, "path to desktop" is returning an alias to which you are
>> trying to concatenate a string. Not going to work.
>>
>> Try this instead
>>
>> set gFonovisaDMG to ((path to desktop as Unicode text) &
>> "Fonovisa.dmg")
>>
>> The result of which is a string, add "as alias" at the end of the
>> above to coerce it back to an alias (file must exist).
>>

Why are you trying to use "file://", it's meant to be part of a URL. Normally that usage will open a document in your default web browser assuming it can handle "file://" URLs.

You are throwing everything but the kitchen sink at this and trying to go places you need not go. I recommend you slow down a bit and learn how one thing  at a time works before you try to use it.

As for what I sent you earlier, it is a correction to one specific line of code and that line was quoted in my message. I explained why that line was failing and how to correct it. Please re-read the message. Apply the message only to the line of code I quoted (see below).

To open a dmg file on your desktop use

set fp to ((path to desktop as Unicode text) & "Fonovisa.dmg") as alias
tell application "Finder" to open fp

JBS
--
Everyone has a photographic memory; Some just don't have film.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Download dmg and then mount the volume ? (From: Graham Anderson <email@hidden>)

  • Prev by Date: Re: Code for applications not already installed
  • Next by Date: Re: Curl progress bar ?
  • Previous by thread: Re: Download dmg and then mount the volume ?
  • Next by thread: Re: Download dmg and then mount the volume ?
  • Index(es):
    • Date
    • Thread