• 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: Strange problem with quotes running away and hiding!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange problem with quotes running away and hiding!


  • Subject: Re: Strange problem with quotes running away and hiding!
  • From: Michael Terry <email@hidden>
  • Date: Mon, 30 Jun 2003 16:12:27 -0700

On 6/30/03 3:19 PM, "Steven D. Majewski" <email@hidden> wrote:

> on unixfiletype(pathname)
> if pathname contains ":" then set pathname to POSIX path of pathname
> set res to do shell script "file " & (quoted form of pathname)
> return first word in text (offset of ":" in res) thru (length of res)
> of res
> end unixfiletype

Sorry, I can't really help you with your problem, but I thought it might be
interesting for you to know that you can refer to the text relative to the
end of a string using -n notation. So in this case:

return first word in text (offset of ":" in res) thru -1 of res

Maybe not too helpful here, but you can imagine if the substring didn't go
all the way to the end of the line:

"##### string #####"
result's text 7 thru -7
--> "string"


Mike
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Strange problem with quotes running away and hiding! (From: "Steven D. Majewski" <email@hidden>)

  • Prev by Date: Re: OSX Coding Help
  • Next by Date: [FYI] Casady & Greene
  • Previous by thread: Strange problem with quotes running away and hiding!
  • Next by thread: [FYI] Casady & Greene
  • Index(es):
    • Date
    • Thread