It says when returning a list of values they should be returned as an array.
In the HW docs I only found an example returning a single value (which works fine). I tried to return an array like this:
Yes, exacly.
I'm trying to return not only one but a list of values back to the ARexx script that has called a function which I handle in the "OnArexx" event.
Here's an excerpt from https://wiki.amigaos.net/wiki/UI_Style_ ... rning_Data (chapter "Returning Data")
When the command returns multiple records, it should allow the user to specify a stem variable to place the contents in. For example, a command that would return the names of the loaded documents in a text editor would normally return information in the RESULT field, but if the user chooses to place the information in a stem variable, he could specify:
DocList.count = 3
DocList.0 = Letter to John Doe
DocList.1 = Notes on Standards
DocList.2 = Addresses of the Stars
In the above example, DocList.count contains the number of records in the array. Also note that the elements do not contain quotes around the information.
In my case (app SonosController), I would like to return a list (array?) of track names to the ARexx script with a command to query the current playlist.
mrupp wrote: ↑Sun Jan 21, 2024 1:03 pm
Yes, exacly.
I'm trying to return not only one but a list of values back to the ARexx script that has called a function which I handle in the "OnArexx" event.
I don't think that this is technically possible. The interface in rexxsyslib.library expects all return values to be strings so Hollywood can't really pass anything else back to ARexx. So if you want to return a list or something, I think you'd manually have to "stringify" that list somehow, maybe by embedding the individual list entries in quotes or something in one large string.