• 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: Dice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dice


  • Subject: Re: Dice
  • From: Graff <email@hidden>
  • Date: Wed, 27 Oct 2004 21:06:00 -0400

That works.  You can even shorten it to something like this:

----
display dialog some item of {"Eatl", "Spit Out", "Nothing"}
display dialog some item of {"Eagle", "Mouse", "Flower"}
----

This basically does the same thing with less variables and lines of code. One cool thing about AppleScript is that it is pretty easy to string together commands and still have the result be intelligible.

Like most programming languages there are a million ways to do anything. Use whichever way gets the job done easiest!

- Ken

On Oct 27, 2004, at 8:46 PM, Kevin wrote:

Well, I am a sophmore in high school and taking Biology and we had to
create a game about the carbon cycle.  So I nedded a dice that could
represent certain things happening.  So I was trying to make a dice
that could have phrases on it.  I came up with this:

set names to {"Eatl", "Spit Out", "Nothing"}
set roll to random number from 1 to 3
set theRoll to item roll in names
display dialog theRoll

delay 1

set names2 to {"Eagle", "Mouse", "Flower"}
set roll2 to random number from 1 to 3
set theRoll2 to item roll2 in names2
display dialog theRoll2

Of course, this goes with the game board but it works as a great dice.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re:Dice (From: Kevin <email@hidden>)
 >Re:Dice (From: Brian Johnson <email@hidden>)
 >Re: Dice (From: Joseph Weaks <email@hidden>)
 >Re: Dice (From: Kevin <email@hidden>)

  • Prev by Date: Re: Dice
  • Next by Date: Re: Dice
  • Previous by thread: Re: Dice
  • Next by thread: Re: Dice
  • Index(es):
    • Date
    • Thread