2016-11-08 43 views
0

我需要多個條件是真實的運行我的腳本的AppleScript:多重條件

set var1 to "variable 1 is here" 
set var2 to "variable 2 is here" 


if var1 = "variable 1 is here" and var2 "variable 2 is here" then 
    set var1 to "true" 
end if 

這不,雖然工作時,我想的AppleScript不允許這樣。

我想然後做這樣的事情:

set score to 0 
set var1 to "variable 1 is here" 
set var2 to "variable 2 is here" 

if var1 = "variable 1 is here" then 
    set score to score + 1 
end if 

if var2 = "variable 2 is here" then 
    set score to score + 1 
end if 

if score = 2 then 
... 

有什麼簡單的,這?

回答

1

你錯過了VAR2後=

if var1 = "variable 1 is here" and var2 = "variable 2 is here" then