• 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: Text String to Command??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Text String to Command??


  • Subject: Re: Text String to Command??
  • From: "Randy Fingeroot" <email@hidden>
  • Date: Mon, 08 Jan 2001 16:48:48 -0500

How about setting K to a string rather than a list?

set theArray to {"bob", "ted", "carol", "alice"}
set k to ""
repeat with j from 1 to count of theArray
set k to k & "x=" & item j of theArray & " or "
end repeat

--

Randy Fingeroot
Systems Editor
Tallahassee Democrat
(850) 599-2141
(850) 599-2295 (fax)

> From: Michael Kern <email@hidden>
> Date: Mon, 8 Jan 2001 15:39:56 -0500
> To: "Applescript lists" <email@hidden>
> Subject: Text String to Command??
>
> Array = {"bob", "ted", "carol", "alice"}
>
> repeat with j from 1 to x
> set k to k & "x=" & item j of Array & " or "
> end repeat
>
> Find k
>
> The problem is that k is all text:
> Find "x=""bob"" or ""x=""ted"" or ""x=""carol"" or ""x=""alice"
> (or something like this)
>
> I would prefer:
> Find x="bob" or x="ted" or x="carol" or x="alice"


References: 
 >Text String to Command?? (From: Michael Kern <email@hidden>)

  • Prev by Date: Re: Reading Lists and Records from Disk Files
  • Next by Date: Re: Subroutines
  • Previous by thread: Text String to Command??
  • Next by thread: Circumventing non-scriptable apps
  • Index(es):
    • Date
    • Thread