pplescript in Textexpander

l need some help with Applescript in Textexpander.

I am trying to do the following … its just an example :
– all scripts are set to Applescript –

script 1 * abbreviation = test1
set name to “%snippet:xn%” ( pop up with different names)
set combo to "Hi “&name&”, how are you doing? Have you read the latest Superman comic? %snippet:test2%

"

return combo


script 2 * abbreviation = test2
set name to “%snippet:xn%”

if name is equal to “Max” then set Text1 to “%snippet:xasp%” (xasp = just a paragraph

if name is equal to “Jane” then set Text1 to “%snippet:xcsp%”(xcsp = just a paragraph)

set result to ((Text1))
return result
end

*** the error l am getting is **
l type test1
i see:

Hi Max, how are you doing? Have you read the latest Superman comic?

*** whats missing is the test that is linked to " Max" in snippet test2 **

the only problem l can think of is that its not reading what name is set in snippet test1

please help

regards
Gotty

I’m not sure that is the correct explanation but it seems that the instruction :
[format]if name is equal to “Max” then set Text1 to “%snippet:xasp%” (xasp = just a paragraph[/format]

is not correctly formed.

I’m quite sure that it must end with a closing paren :

[format]if name is equal to “Max” then set Text1 to “%snippet:xasp%” (xasp = just a paragraph)[/format]

Yvan KOENIG running El Capitan 10.11.6 in French (VALLAURIS, France) mercredi 27 juillet 2016 14:30:09