Re: Converting Pictures via AppleScript?
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