• 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: set variable to a command?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: set variable to a command?


  • Subject: Re: set variable to a command?
  • From: "David A. Cox" <email@hidden>
  • Date: Wed, 19 Nov 2003 16:39:38 -0800 (PST)

This solution works great for me.

All the help from those on the list is much appreciated.

Several of you asked "why in the heck would you want to even do that" and
I am not sure I have a good answer yet. I am noodeling over a problem with
iTunes and Fast User Switching, and I have a way to send a single command
to iTunes in another user space at this point, but it is complex. I was
hoping that if I could find a way to change the command by making it a
variable I could control in different ways, that might move me along to a
better solution.

I am always amazed at how helpful this group is, and the talent here is
a fantastic resource for a novice scriptor like myself.

Thanks again,

DAC

On Wed, 19 Nov 2003, kai wrote:

> on Wed, 19 Nov 2003 09:06:41 -0800 (PST), "David A. Cox" wrote:
>
> > I am stuck on something simple, and I don't know why I can't get my head
> > around what is wrong.
> >
> > I want to set a variable to a command name in a script for itunes, and I
> > can't seem to get the command to execute.
> >
> > This works:
> >
> > tell application "iTunes"
> > play
> > end tell
> >
> > This does not:
> >
> > set command to "play"
> > tell application "iTunes"
> > command
> > end tell
> >
> > I have fiddled around with different syntax ways of saying the same thing,
> > but I seem to fail each time. I am using the latest OS and iTunes. I am
> > sure I am just missing something super basic, but I can't seem to see
> > it....
>
> Try this, David:
>
> ---------------------
>
> set command to "play"
> tell application "iTunes"
> run script command
> end tell
>
> ---------------------
>
> ---
> kai
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: set variable to a command? (From: kai <email@hidden>)

  • Prev by Date: Re: Getting label from a record (part 2)
  • Next by Date: Re: UI Scripting of FileMaker
  • Previous by thread: Re: set variable to a command?
  • Next by thread: Re: set variable to a command?
  • Index(es):
    • Date
    • Thread