Re: Paths & quoted form & do shell script
Re: Paths & quoted form & do shell script
- Subject: Re: Paths & quoted form & do shell script
- From: Martin Orpen <email@hidden>
- Date: Sun, 09 Oct 2005 09:51:31 +0100
- Thread-topic: Paths & quoted form & do shell script
on 9/10/05 02:39, Mark J. Reed at email@hidden wrote:
> Well, this script works for me:
>
> set thePath to "/Users/martinorpen/Documents/Photoshop Edit Log.txt"
> do shell script "/usr/bin/grep -i saved " & quoted form of thePath
>
> Maybe the path in the text file is weird? It doesn't include quote
> marks in the file, does it?
They are identical to the human eye, identical in class, but not identical
to AS:
set theFlag to false
set tFile to (path to temporary items as string) & "PSLogTest.txt"
set thePath to paragraph 1 of (read file tFile)
log thePath
set otherPath to "/Users/martinorpen/Documents/Photoshop Edit Log.txt"
log otherPath
if thePath is equal to otherPath then
set theFlag to true
end if
log theFlag
What I see in the Event Log is:
(*/Users/martinorpen/Documents/Photoshop Edit Log.txt*)
(*/Users/martinorpen/Documents/Photoshop Edit Log.txt*)
(*false*)
But, I've just realised that the strings aren't identical to Entourage
either - look what I get when I paste:
(*/Users/martinorpen/Documents/Photoshop Edit Log.txt*)
(*/Users/martinorpen/Documents/Photoshop Edit Log.txt*)
(*false*)
Or Text Edit:
(**)
(*/Users/martinorpen/Documents/Photoshop Edit Log.txt*)
(*false*)
What the bloody hell is going on?
(The original text file was written using "open file for access/write to
file/close file")
--
Martin Orpen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden