Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #90456

Re: Applescript Q: file specifications

From Jolly Roger <jollyroger@pobox.com>
Newsgroups comp.sys.mac.system
Subject Re: Applescript Q: file specifications
Date 2016-03-28 21:15 +0000
Organization People for the Ethical Treatment of Pirates
Message-ID <dltl87F8ir9U1@mid.individual.net> (permalink)
References (4 earlier) <56f8d583$0$5013$b1db1813$7968482@news.astraweb.com> <dlt202F3omfU1@mid.individual.net> <56f983f0$0$16692$c3e8da3$76a7c58f@news.astraweb.com> <dlth13F6q94U3@mid.individual.net> <56f99d53$0$62778$c3e8da3$dbd57e7@news.astraweb.com>

Show all headers | View raw


On 2016-03-28, JF Mezei <jfmezei.spamnot@vaxination.ca> wrote:
> On 2016-03-28 16:03, Jolly Roger wrote:
>> set quotedfile to the quoted form of (aPhoto's original path as text)
>
> This worked.
>
> So how come I am able to
>
> write "original: " & aPhoto's original path & return to outfile
>
> which seems happy to handle "original path" as a string, but can't do
> the "quoted form" of aPhoto's original path without it trying to quote a
> binary object (the phone as a whole).

Because it's not resolving to a string in that context, but an object
reference instead. Sometimes variables need to be coerced - in any
language.

> BTW, all it does is add a single quote at start and end of string,
> something that would be easier done as
>
> write "original: '" & aPhoto's original path & "'" & return to outfile

That's subjective and debatable. I consider typing "the quoted form of"
to be both easier and faster in most cases. 

> or does this "quoted form" grant the string special powers and different
> handling because it is treated as a quoted string ? Or does it just
> merely add the ' characters fore and aft of the string and still
> considers it a string ?

set someString to "this is a string"
log class of someString
set anotherString to the quoted form of someString
log class of anotherString

-- 
E-mail sent to this address may be devoured by my ravenous SPAM filter.
I often ignore posts from Google. Use a real news client instead.

JR

Back to comp.sys.mac.system | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Applescript Q: file specifications JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-03-27 01:54 -0400
  Re: Applescript Q: file specifications dempson@actrix.gen.nz (David Empson) - 2016-03-27 21:36 +1300
    Re: Applescript Q: file specifications JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-03-27 15:10 -0400
      Re: Applescript Q: file specifications Jolly Roger <jollyroger@pobox.com> - 2016-03-27 19:25 +0000
      Re: Applescript Q: file specifications dempson@actrix.gen.nz (David Empson) - 2016-03-28 12:35 +1300
        Re: Applescript Q: file specifications JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-03-28 02:55 -0400
          Re: Applescript Q: file specifications Jolly Roger <jollyroger@pobox.com> - 2016-03-28 15:47 +0000
            Re: Applescript Q: file specifications JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-03-28 15:20 -0400
              Re: Applescript Q: file specifications Jolly Roger <jollyroger@pobox.com> - 2016-03-28 20:03 +0000
                Re: Applescript Q: file specifications JF Mezei <jfmezei.spamnot@vaxination.ca> - 2016-03-28 17:08 -0400
                Re: Applescript Q: file specifications Jolly Roger <jollyroger@pobox.com> - 2016-03-28 21:15 +0000
  Re: Applescript Q: file specifications Paul Sture <nospam@sture.ch> - 2016-03-27 10:53 +0200
  Re: Applescript Q: file specifications Jolly Roger <jollyroger@pobox.com> - 2016-03-27 16:53 +0000

csiph-web