Converting unix styled path (string) to Mac path?
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.