trying to build text in an applescript to point to a variable
trying to build text in an applescript to point to a variable
- Subject: trying to build text in an applescript to point to a variable
- From: "David A. Cox" <email@hidden>
- Date: Fri, 12 Sep 2008 11:18:19 -0700
I am looking to choose a variable based on some user input. I thought
it would be most efficient via something like what I have below, but
it is not working for me, and I have not found a good way to get it
to actually do what I want. Rather than get one of the items from the
list that exists (what I want) I get a random letter from the name of
the list. I can fully see why this is happening, but I am not seeing
a way around this. If this is not possible, I can go the about the
longer way of aiming at the list, but that will be sort of a pain
with 26 lists to choose from.
set NounToUse to "Hoover"
set TheListToUse to (the first character of NounToUse) & "List"
set HList to {"Hankering", "Horrible", "Helping handed", "Harping",
"Hardboiled", "Hairbrained", "Hippity Hoppity", "Hatchet nosed"}
set the list_count to the count of TheListToUse
set pick to random number from 1 to list_count
set AdjectiveToUse to item pick of TheListToUse as string
return AdjectiveToUse & " " & NounToUse
--Thanks for any help you can give....
_______________________________________________
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