• 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: Questions from Newbie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions from Newbie


  • Subject: Re: Questions from Newbie
  • From: Michelle Steiner <email@hidden>
  • Date: Wed, 28 Feb 2001 14:11:21 -0800

On 2/28/01 3:27 AM, Max Salven <email@hidden> wrote:

>Also, I'd appreciate tips on how to parse the "item_comments" properly. All
>I want it to do is take the right 36 characters, and then the left 32
>characters. In VBScript (ugh) it would be something as simple as this:
>item_comments = left(right(item_comments,36),32)
>But how do I do it in apple script?

text -36 through -5 of item_comments

this means take the text starting with the 36th character from the right
through the fifth character from the right.

>The error I get is:
>"Can't get comment of: {alias "System: Desktop Folder: File Created by Max
>Salven - .0"}."

That's because you have a list of aliases. You need to step through the
list.

on open this_item
tell application "Finder"
activate
repeat with each_item in this_item
set the item_comments to the comment of this_item
--if the item_comments is not "" then [parse the comments]
if the item_comments is not "" then set name of this_item to
item_comments
end repeat
end tell
end open

--Michelle



----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: Moving printers
  • Next by Date: Re: Subject title censorship (was Questions from Newbie)
  • Previous by thread: Re: Subject title censorship (was Questions from Newbie)
  • Next by thread: Moving desktop printer
  • Index(es):
    • Date
    • Thread