I’m afraid there’s no way currently to have a Text Box in the script GUI and it seems that the line breaks are lost if you use a regular String input.
Other options for sending multi-line text to a script is to attach a text file to E.g. Project or Dataset, such as for ‘populate_metadata’ script (see http://help.openmicroscopy.org/scripts.html#metadata) or you could simply edit the Description of the Image you want to process and paste the text there, which can be read by the script. It’s not ideal but it might work for you.
I’m wondering whether allowing users to enter arbitrary macros is a good idea? For the examples at http://www.sussex.ac.uk/gdsc/intranet/microscopy/Datamanagement/omero/scripts/ and in our own limit testing, we prepare a single script with a single macro. This is because the macro is quite tightly coupled to the input and output from ImageJ, and you need the python code to load suitable data from OMERO and to handle the output of the IJ Macro, saving it back to OMERO in some way. E.g. the output might be 1 or more images, or csv file or ROIs etc.
But perhaps you could parse the Macro text from users to check whether it calls a ‘whitelist’ of macros that produce output that the script can handle?
Just to clarify - our testing was with multiple users simultaneously running macros on a single ImageJ. Unfortunately this was a while ago and one of the main team members who did the work is currently on vacation, so it’s difficult to provided details of what failed. We considered installing multiple copies of ImageJ under different locations and have each user call a different one, but this seemed too much work and not scalable.
It’s possible that the python script could copy the ImageJ app itself into the script directory where the python code it running before executing the Macro there (the directory is cleaned up by the server when the script completes) but we haven’t tried that.
It would be interesting to hear if Alex Herbert had any problems and how he resolved them but it seems he is no longer at Sussex uni.