• 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: Converting Pictures via AppleScript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting Pictures via AppleScript?


  • Subject: Re: Converting Pictures via AppleScript?
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 31 Jul 2010 09:52:02 +1000
  • Thread-topic: Converting Pictures via AppleScript?

On 31/7/10 4:33 AM, "Alex Zavatone" <email@hidden> wrote:

> Known bugs are that a single quote in the file name will cancel the
> conversion.  Need to replace the single quotes in my shell string with double
> quotes.

Don't try quoting POSIX paths your self -- that's what "quoted form" is for:

set myShellString to "sips -s format png -s " & quoted form of myPosixFile &
" --out " & quoted form of myPosixNewItem

> set myItemCount to the number of text items in myFile
> set myFileName to the last text item of myFile
> set myFilePath to text items 1 through (myItemCount - 1) of myFile

Can be simplified to:

set myFileName to the last text item of myFile
set myFilePath to text 1 thru text item -2 of myFile


--
Shane Stanley <email@hidden>



 _______________________________________________
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

References: 
 >Re: Converting Pictures via AppleScript? (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Libraries and effiency
  • Next by Date: Re: Remote Script Server
  • Previous by thread: Re: Converting Pictures via AppleScript?
  • Next by thread: Re: Converting Pictures via AppleScript?
  • Index(es):
    • Date
    • Thread