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

Text String to Command??


  • Subject: Text String to Command??
  • From: Michael Kern <email@hidden>
  • Date: Mon, 8 Jan 2001 15:39:56 -0500

Is there any way to convert a text string to an apple script command.

I need to loop through a bunch of user entered strings concatenating them
with other text. The final result will be part of the next line of
Applescript code in the same script. Something like this (I9ll clean up
the dangling "or" later):

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"

Is there anyway to do this?



Michael Kern
Technologic Partners
(212) 343-1900 x116
email@hidden


  • Follow-Ups:
    • Re: Text String to Command??
      • From: "Randy Fingeroot" <email@hidden>
  • Prev by Date: default buttons for dialog boxes
  • Next by Date: Re: Forcing an applet to quit
  • Previous by thread: Re: default buttons for dialog boxes
  • Next by thread: Re: Text String to Command??
  • Index(es):
    • Date
    • Thread