• 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
Create Aliases to Network Volumes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Create Aliases to Network Volumes


  • Subject: Create Aliases to Network Volumes
  • From: Daniel Brashler <email@hidden>
  • Date: Thu, 11 Jul 2013 11:05:26 -0400

Ok,

I'm a fairly newbie scripter trying to write what seemed like it should be a simple thing . . .

I'm using AppleScriptObjC to create an application that maps a pair of network volumes, and then creates a pair of aliases to directories within those volumes.

Connecting to the shares is working fine, but creating an alias isn't seeming as simple as the documentation might lead one to believe.  Each time I run the following code (where theuserText= "abc123" and AliasPath = "\Volumes\\networkVol\abc123") 

set theAliasName to theuserText & "_H-drive"

set theAliasLocation to (POSIX path of (path to desktop as string)) & theAliasName

set mytargeturl to current application's NSURL's fileURLWithPath_(theAliasPath)

set myaliasurl to current application's NSURL's fileURLWithPath_(theAliasLocation)       
     
set mybookmark to current application's NSURL's bookmarkDataWithContentsOfURL_error_(mytargeturl,missing value)

set didAlias to current application's NSURL's writeBookmarkData_toURL_options_error_(mybookmark,myaliasurl,missing value,missing value)

I get:

unable to set argument 4 - the AppleScript value <NSAppleEventDescriptor: 'msng'> could not be coerced to type Q. (error -10000)

What am I missing?  What am I passing that needs to be coerced to type Q?

Daniel Brashler
Sr. Computing Consultant
College of Arts and Sciences

Fast Help -> lehigh.edu/help

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Create Aliases to Network Volumes
      • From: Shane Stanley <email@hidden>
    • Re: Create Aliases to Network Volumes
      • From: Emmanuel LEVY <email@hidden>
  • Prev by Date: Re: controlling sound input on Mac Pro?
  • Next by Date: Re: controlling sound input on Mac Pro?
  • Previous by thread: Re: Revisited: controlling sound input on Mac Pro?
  • Next by thread: Re: Create Aliases to Network Volumes
  • Index(es):
    • Date
    • Thread