An encrypted script might not run the same as the unencrypted script if the script attempts to convert parts of itself from expressions back to character strings. This is necessary to keep the script encrypted. You can avoid this problem by using the expression manipulation functions such as Arg(), Head(), Substitute(), and so on. You can also use Parse() to make expressions from character strings that are part of the encrypted script.
ex = Expr(
aaa = 20;
The script fails when encrypted because Char() is unable to break the encryption of the expression stored in ex. A second example follows:
ex = Expr(
aaa = 20;
ch = "aaa = 20; Show(aaa);";
temp; // and Temp holds an unencrypted expression.
You might prefer the third choice over the second choice because it looks easier to understand; be aware that you might want to clear variables like ch and Temp when you are done with them. You probably encrypted the script to keep other folks from reading it, and they will definitely be able to see the content of variables when you are done.