As background to answer: PPro developed over a long period. As new (better?) features were added, older ones were kept for compatibility. But you should ignore those older approaches.
In this case, that means you should keep scripts in files. For very short scripts of less than 500 characters, you can use exec morecommandsasscript and put the script in the more commands section of the command entry controls instead of a file..
So for your case, I recommend
Exec
Morecommandsasscript
if (...) do
win.show...
endif
Also notice that the keyword *script is not used; it is one of those older approaches.
If this is a longer script, you should store in file. If you do not know how, read ppst.chm in ppro exe, ignoring any parts about older syntax, and then post questions.
OLDER SYNTAX ()NOT RECOMMENDED)
1. You can store long scripts as a command list, where each line in the script is a separate command in the clist. Not recommended except for very special cases.
You can also store single if commands in the command entry controls as follows
Command: If
Command Parameters: (expression)
More commands: One or more statements to be controlled by the if.
For this old syntax, you do not use Do. This can be confusing so it is simpler to always use morecommandsasscript.