Code: Select all
if %name<>"Fredrik" then
@uiprompt("%name is NOT Fredrik")
else
@uiprompt("%name is Fredrik")
endif
if %name="Fredrik" then
@uiprompt("%name is Fredrik")
else
@uiprompt("%name is NOT Fredrik")
endifHowever, both of if statements return false and the first dialog box thus reads "%name is Fredrik". In order for the first if statement to return true, in line with my intuition, it needs to be rewritten as
Code: Select all
if @isempty(%name) or %name<>"Fredrik" then
@uiprompt("%name is NOT Fredrik")
else
@uiprompt("%name is Fredrik")
endif