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
|