There are a few issues here. So let’s break them down one by one.
The first is that when you run the code sample as it appears above, Eggplant treats everything up until the ON declaration as the “initial handler” of the script and executes that - in this case it’s just some blank lines, so nothing gets executed. To solve this you could break your inputText handler out into it’s own script or else simply move your call to it up to the front of the script.
Next up is that the call to:
Since inputText is declared as an ON handler and not a Function Handler it can’t be used in this way. So either we need to switch inputText to be a function or else we just call it on a line by itself without the put:
Finally, in inputText itself you don’t want to do “my intxt” which is trying to access a property called intxt. Instead just refer to the local variable directly, without the “my”.
So here is a corrected script which does what you are looking for
on inputText intxt
if intxt is not empty then
repeat with each item of intxt
put "list is empty"
Hopefully this little example helps clear up some things. If you need any other help please don’t hesitate to post or send a support request.