Thanks for the reply
The script is supposed to handle one file at a time. Then the application AMIDE is called. The script works fine when executed as script, when saved as application it does not do anything, no error message is shown, The app just does nothing. It seems to me I am missing...