Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 21, 2010, 04:37 PM   #1
SuperDaveInLA
macrumors newbie
 
Join Date: Apr 2008
Location: Hollywood, CA
Is there an applescript for displaying a random word from a list of supplied words?

I have an apple workflow running off of my laptop for a DIY photo booth at my wedding. The user only has to enter his/her name - the computer then takes 3 snapshots from webcam, formats them into strip form, sends them to a printer, then loops and starts over. What I'm trying to do now is before each snapshot I'd love a dialog to show a random emotion that the user should portray in each shot.

What I want to do is have a list of like 30 possible scenarios ("extremely happy" "shocked" "the person next to you smells", etc etc etc.) and have the computer pick one of them to display before each shot.

Any idea how to do this?!
SuperDaveInLA is offline   0 Reply With Quote
Old Jul 21, 2010, 05:54 PM   #2
Caleb531
macrumors 6502
 
Join Date: Oct 2009
Here you go. Edit it however you'd like:

Code:
set emotions to {"Happy", "Sad", "Angry", "Funny", "Confused", "Shocked"}
set randomEmotion to some item of emotions
Caleb531 is offline   0 Reply With Quote
Old Jul 21, 2010, 06:01 PM   #3
SuperDaveInLA
Thread Starter
macrumors newbie
 
Join Date: Apr 2008
Location: Hollywood, CA
Caleb - sorry if I'm out of my league here, but that script isn't displaying anything. It's running, but I'm not seeing anything. Am I doing something incorrectly?
SuperDaveInLA is offline   0 Reply With Quote
Old Jul 21, 2010, 06:11 PM   #4
SuperDaveInLA
Thread Starter
macrumors newbie
 
Join Date: Apr 2008
Location: Hollywood, CA
oh sweet, i think i figured it out! Added display dialog randomEmotion

Thank you dude!
SuperDaveInLA is offline   0 Reply With Quote
Old Jul 21, 2010, 07:09 PM   #5
fredfnord
macrumors member
 
Join Date: Sep 2007
You can also pick from a file, etc

There are literally dozens of ways to do this.

Seriously, look into some of the AppleScript tutorials online. AppleScript is surprisingly powerful, and very straightforward.

-fred
fredfnord is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Transfer Audio from PC to iPhone.. Is there an APP for that? SortKaffe iPhone 5 Apr 7, 2011 01:18 PM
Is there an Applescript for this function in pages? appleguy123 Mac Programming 0 Dec 24, 2009 09:31 PM
Is there an app to display all my stocks and shares windows? tonym182 Buying Tips and Advice 1 Nov 2, 2009 08:32 PM
is there an adapter for an old Cinema Display to hook up to at PowerPC G4 Knickers91 Mac Peripherals 2 Jan 15, 2009 12:21 PM
Is there an App for Sounds like Summerboard for themes? moviecouple Jailbreaks and iOS Hacks 1 Apr 9, 2008 05:43 PM


All times are GMT -5. The time now is 12:12 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC