Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


ALERT - List is not available in Name - AppleScript

Enthusiast ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

Hi All,

 

Request:
I need to alert or stop the tool execution, if any one of my list of langauge code that should not match with the selected folder name.  

 

i.e., 

set myList to {"eng", "fren", "arab", "chin"}

set theFolderName to "abcdef"

 

Here the condition is false. So I want to stop the tool execution.

Please help on this.

 

Thanks

SS

 

 

TOPICS
Scripting

Views

94

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , Jan 24, 2021 Jan 24, 2021
Check if the name is not in the list followed by return, which will stop the script: set myList to {"eng", "fren", "arab", "chin"} set theFolderName to "abcdef" if theFolderName is not in myList then display dialog theFolderName & " is not in myList" return end if display dialog theFolderName & " is in myList"

Likes

Translate

Translate
Valorous Hero ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

Can you provide more details ?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 24, 2021 Jan 24, 2021

Copy link to clipboard

Copied

LATEST

Check if the name is not in the list followed by return, which will stop the script:

 

 

set myList to {"eng", "fren", "arab", "chin"}

set theFolderName to "abcdef"

if theFolderName is not in myList then
	display dialog theFolderName & " is not in myList"
	return
end if

display dialog theFolderName & " is in myList"

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines