RE: [spam] Converting unix styled path (string) to Mac path?
RE: [spam] Converting unix styled path (string) to Mac path?
- Subject: RE: [spam] Converting unix styled path (string) to Mac path?
- From: <email@hidden>
- Date: Wed, 31 Mar 2004 13:13:09 +0530
- Thread-topic: [spam] Converting unix styled path (string) to Mac path?
Try giving the full path ----
"Macintosh HD:Users:cpruitt:Desktop:CCBelief.rtf"
If you have different name for your startup disk then provide that name
where Macintosh HD is placed.
-----Original Message-----
From: Cliff Pruitt [
mailto:email@hidden]
Sent: Wednesday, March 31, 2004 5:33 AM
To: email@hidden
Subject: [spam] Converting unix styled path (string) to Mac path?
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.
_______________________________________________
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.