Re: Contains?
Re: Contains?
- Subject: Re: Contains?
- From: Michelle Steiner <email@hidden>
- Date: Thu, 11 Sep 2008 11:21:12 -0700
On Sep 11, 2008, at 11:09 AM, J. Todd Slack wrote: OK, that is good to know. I am actually trying to do a contains based upon an array. Is that allowed? I wanted to make sure I had the right syntax (and I had a typo :()
property invalid_files : {".m4a", ".m4p", ".aac"}
if c_ring_tone_file contains invalid_files then display dialog "opps" end if
Is something like this allowed?
How do you define c_ring_tone_file? It would have to be a list for your script to work. If it's a string (e.g., ".m4a"), then your code won't work. you would need something like this:
set c_ring_tone_file to ".m4a" property invalid_files : {".m4a", ".m4p", ".aac"}
if c_ring_tone_file is in invalid_files then display dialog "opps" end if
Alternatively:
set c_ring_tone_file to ".m4a" property invalid_files : {".m4a", ".m4p", ".aac"}
if invalid_files contains c_ring_tone_file then display dialog "opps" end if
-- Michelle
-- Please contribute to the Leukemia and Lymphoma Society, and help me meet my fund raising goal for my marathon training.
|
_______________________________________________
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