• 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
tell app, name in string var
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tell app, name in string var


  • Subject: tell app, name in string var
  • From: Leonid Bogdanov <email@hidden>
  • Date: Tue, 17 May 2011 16:30:10 +0400

Hello!

  I want to pass a name of an app to which tell a command in a string variable and then do some stuff.
  But if, for example, I try to retrieve a value of a two-word property, I receive a compile time error.

  -- works Ok
  tell app "Microsoft Excel"
      return display alerts
  end tell

  -- doesn't compile
  set appName to "Microsoft Excel"
  tell app appName
      return display alerts
  end tell

  How can I make the second script compilable?

Thank you.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: tell app, name in string var
      • From: Shane Stanley <email@hidden>
    • Re: tell app, name in string var
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Automatic Bind to AD
  • Next by Date: Re: tell app, name in string var
  • Previous by thread: Re: Automatic Bind to AD
  • Next by thread: Re: tell app, name in string var
  • Index(es):
    • Date
    • Thread