I have an applescript that gets a list of items and then iterates over them:
tell application "GeekTool Helper"
set names to name of geeklets
repeat with currentName in names
if (currentName is equal to "Top_CPU_Processes") then
display dialog "found it"
end if
return currentName
end repeat
end tell
The names
variable gets set to an array of strings properly. When I repeat over the list I'm able to get each of the currentName
variables returned separately without an issue.
The problem that I'm running into is the if statement. I'm never getting the dialog box that display's "found it".
I've tried the comparison as if (currentName = "Top_CPU_Processes") then
as well and it still never evaluates as true.
Is there something that I need to do to have the contents of the variable evaluate against the string?
return "found it"
because it never printed. I'll return toreturn
. – Chris Schmitz Feb 28 '14 at 15:03contents
property):contents of currentName is equal to …
See ASLG onreference
ora reference to
. – Chris Johnsen Mar 01 '14 at 10:27as string
operator fixed the issue I was having – redolent Aug 10 '18 at 05:05