• 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
Converting unix styled path (string) to Mac path?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Converting unix styled path (string) to Mac path?


  • Subject: Converting unix styled path (string) to Mac path?
  • From: Cliff Pruitt <email@hidden>
  • Date: Tue, 30 Mar 2004 19:03:23 -0500

Hey everyone, Maybe one of you guys can help me cause I'm ripping my
hair out here... ;-(

I'm new to applescript & the languages on the web that I've dealt with
before seem to be much better at coercion. Though in all fairness the
need for data types is much less in that setting. I'm trying to write
a really simple (I thought) script that gets a value for a cell and
then uses that as a path and reveals that file in the finder. If I use
the value from the cell (text string) it generates an error, but if I
try typing in the exact same path into the script itself, it runs no
problem.

So If anyone can explain to me how to convert a Unix Styled path as a
text string into a path that AppleScript can actually use I'd really
appreciate it a lot. I know it should be simple but I just apparently
lave less of an understanding than I thought I did.

heres my script:

property cellValueText : "-empty-"

tell application "OmniOutliner"
activate
set cellValueText to text of cell 2 of selected row of document 1
end tell

-- cellValueText is now set to:
-- "/Users/cpruitt/Desktop/CCBelief.rtf"

tell application "Finder"
activate
set openPath to cellValueText
reveal openPath
end tell

-- Generates Error:
-- Finder got an error: Can't get
"/Users/cpruitt/Desktop/CCBelief.rtf".




- Cliff
_______________________________________________
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.


  • Follow-Ups:
    • Re: Converting unix styled path (string) to Mac path?
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: Re: do shell script curl where url must contain double quotes
  • Next by Date: Re: AppleScript & HTML Again...
  • Previous by thread: Re: Image Events
  • Next by thread: Re: Converting unix styled path (string) to Mac path?
  • Index(es):
    • Date
    • Thread