Simple AppleScript question

Ask a Question related to Mac Programming, Design and Development.

  1. #1

    Default Simple AppleScript question

    I'm not sure whether this is the appropriate forum. If not, please
    redirect me.

    I'm using the Speakable Items feature in MacOS X. I want to add a simple
    AppleScript that tell iTunes to play, wait 5 minutes and tell iTunes to
    stop playing.

    This works :
    tell application "iTunes"
    play
    delay 300
    stop playing
    end tell

    But the computer stops listening spoken commands until the timer has
    shot. When the script terminates, the spoken commands queue gets
    suddently flushed.

    I don't know AppleScript very well. Would it be possible to work around
    the problem ?

    I thought it might be possible to install a crontab that would tell
    iTunes to stop but I don't know how to do that.
    -> tell application "iTunes" to play
    -> Install a crontab to make it stop in 5 minutes

    Any help ?

    --
    Julien Salort
    [url]http://www.juliensalort.org[/url]
    Julien Salort Guest

  2. Similar Questions and Discussions

    1. Need Simple Answer to Simple Contribute/Firefox question
      Hello all; I've tried the Adobe help in CS3, tech support, phone support, this forum, other forums, Mozilla, and nowhere can I get a straight...
    2. Simple question ( Please help)
      Hi, I currently working on a project to configure two ISA 2000 server in Windows 2003 w/ Load Balancing and Fault Tolerance. ISA1 = 10.100.1.1...
    3. Very simple question, but not for me!!!
      Hi, very new to flash. 1, is there ang good site to get example sites/clips/buttont etc, i.e you get the FLA (or what ever the letter are, i said...
    4. Simple question...
      I'm trying to set a dynamic textfield and give it a new value. I have a movie symbol (mov) in which there is a textfield (topic). In the main...
    5. Simple IF question
      I want to create a calculation that essentially says: If CONDITION = A, "Say This", if CONDITION = B, "Say That", otherwise DO NOTHING. This...
  3. #2

    Default Re: Simple AppleScript question

    In article <1fzp06t.i4blormtfmg6N%mail@juliensalort.org>,
    [email]mail@juliensalort.org[/email] (Julien Salort) wrote:
    > I'm not sure whether this is the appropriate forum. If not, please
    > redirect me.
    alt.comp.lang.applescript is probably the best newsgroup for questions
    about AppleScript.
    > I'm using the Speakable Items feature in MacOS X. I want to add a simple
    > AppleScript that tell iTunes to play, wait 5 minutes and tell iTunes to
    > stop playing.
    >
    > This works :
    > tell application "iTunes"
    > play
    > delay 300
    > stop playing
    > end tell
    >
    > But the computer stops listening spoken commands until the timer has
    > shot. When the script terminates, the spoken commands queue gets
    > suddently flushed.
    > I don't know AppleScript very well. Would it be possible to work around
    > the problem ?
    It depends on how Speakable Items works. According to your description
    of the problem, it seems that as long as the script is not completed,
    Speakable Items will wait doing nothing. If this is the case, a solution
    would be to put your script in a separate applet. The Speakable Items
    script would simply launch it and quit, allowing new commands to be
    spoken and recognized.

    Patrick
    --
    Patrick Stadelmann <Patrick.Stadelmann@unine.ch>
    Patrick Stadelmann Guest

  4. #3

    Default Re: Simple AppleScript question

    In <Patrick.Stadelmann-8A458F.18141614082003@news.fu-berlin.de> Patrick
    Stadelmann wrote:
    > a solution
    > would be to put your script in a separate applet. The Speakable Items
    > script would simply launch it and quit, allowing new commands to be
    > spoken and recognized
    I agree; this is what I was going to suggest. m.

    --
    matt neuburg, phd = [email]matt@tidbits.com[/email], [url]http://www.tidbits.com/matt[/url]
    REALbasic: The Definitive Guide! 2nd edition!
    [url]http://www.amazon.com/exec/obidos/ASIN/0596001770/somethingsbymatt[/url]
    Subscribe to TidBITS. It's free and smart.
    matt neuburg Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139