applescript
Création d'instructions If et Else
Recherche…
Introduction
Ce sujet concerne les instructions if et else.
si variable = 2
set var to 2
if var = 2 then
say "Var equals 2"
end if
si var1 = 4, sinon instructions
set var1 to 5
//set the number to anything
if var1 = 5 then
say "Var one equals 5"
else
say "Var one does not equal 5"
end if
Dialogue retourne le texte
display dialog "Password" default answer ""
set w to text returned of the result
if w = "Password" then
display notification "Correct"
end if
Modified text is an extract of the original Stack Overflow Documentation
Sous licence CC BY-SA 3.0
Non affilié à Stack Overflow