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
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"
Copy link to clipboard
Copied
Can you provide more details ?
Copy link to clipboard
Copied
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"