Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load Image Question



Don't do that.  First off, if you try to write your own quoting routine, you'll almost certainly get it wrong.  For instance, the one below will fail if the name contains a double quote.  Second, quoting is *only* for use with shell commands.  The correct solution is (probably) "POSIX path of x".


--Chris Nebel
AppleScript and Automator Engineering

On Jul 15, 2005, at 12:46 AM, Bastiaan Boertien wrote:

If Quoted form doesn't work you can try this.

set PosixX to POSIX path of x
set PosixX to makePosixPath(PosixX)

on makePosixPath(theFile)
    set AppleScript's text item delimiters to space
    set theTextList to every text item of theFile
    set AppleScript's text item delimiters to "\\ "
    set theNewFileName to theTextList as string
    set AppleScript's text item delimiters to ""
    return theNewFileName
end makePosixPath



Op 14-jul-05 om 17:16 heeft Pete Kincaid het volgende geschreven:



 I tried it, but Im still getting the same error

 On 7/14/05 9:35 AM, "Jasper Van Proeyen" <email@hidden> wrote:


Have you tried
 set x to (get quoted form of POSIX path of x)
 ?
 My guess it's the spaces that cause your problem. I'll test it later when I'm on my machine.

 Regards,
 Jasper.


 On Jul 14, 2005, at 4:32 PM, Pete Kincaid wrote:


 Mac OSX 10.3.8

  

  Here is my issue, I am am trying to load a image using

  

  set image of image view "image" of theWindow to load image x
  
 X is being set from a table cell. This is the value that I am getting for X

  

  Mac5220 OSX:depts:_All:petek:Illustrator Extras:Templates:Business Systems:Bus.Cards_VertCenter.ai
  

  I keep getting this error

  

  File Mac5220 OSX:depts:_All:petek:Illustrator Extras:Templates:Business Systems:Bus.Cards_VertCenter.ai wasn't found. (-43)

  

  I know the file is on that server and the location is correct. If I change my script to load image from choose file it works fine. Is there something that I need to do with my path because this file is located on a server?

  

  --
  Peter Kincaid
  Data Conversion
  Schawk, Inc.
  (815)444-2338

  _______________________________________________
 Do not post admin requests to the list. They will be ignored.
 Applescript-studio mailing list      (email@hidden)
 Help/Unsubscribe/Update your Subscription:

 This email sent to email@hidden

  







-- 
Peter Kincaid
 Data Conversion
 Schawk, Inc.
 (815)444-2338
  _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >Re: Load Image Question (From: Pete Kincaid <email@hidden>)
 >Re: Load Image Question (From: Bastiaan Boertien <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.