• 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: Paths & quoted form & do shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Paths & quoted form & do shell script
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Paths & quoted form & do shell script (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Coercing alias with foreign characters to Unicode text
  • Next by Date: Re: Paths & quoted form & do shell script
  • Previous by thread: Re: Paths & quoted form & do shell script
  • Next by thread: Re: Paths & quoted form & do shell script
  • Index(es):
    • Date
    • Thread