Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Application questions and support => Topic started by: odaman68000 on August 29, 2024, 03:58:54 AM

Title: Space charactor in ARexx script
Post by: odaman68000 on August 29, 2024, 03:58:54 AM
Hi there,
I want to open drawer window on Workbench with Shell/ARexx script.
Many of you already know, the Workbench has an ARexx port "WORKBENCH" and we can use "WINDOW WINDOWS .... OPEN" for this purpose.

I tried below from shell and they worked fine :) :
   rx "ADDRESS WORKBENCH WINDOW WINDOWS 'Workbench:' OPEN"
   rx "ADDRESS WORKBENCH WINDOW WINDOWS 'Devs:DOSDrivers' OPEN"
   rx "ADDRESS WORKBENCH WINDOW WINDOWS 'Work:' OPEN"

But what about, for example 'RAM Disk:T' ?
I tried below from shell but it was failed :
   rx "ADDRESS WORKBENCH WINDOW WINDOWS 'RAM Disk:T' OPEN"

When space char exists in path, it can not be opened from shell.
Anyone, any ideas???
Title: Re: Space charactor in ARexx script
Post by: Thomas on August 29, 2024, 05:32:41 AM

Like everywhere in AmigaDOS you have to surround the string with spaces by double quotes. So the resulting string should be "Ram Disk:T".

As you already have a quoted string you cannot simply add those quotes. ARexx has a solution for that: just double the quote signs.

This should work:

rx "ADDRESS WORKBENCH WINDOW WINDOWS '""RAM Disk:T""' OPEN"




Title: Re: Space charactor in ARexx script
Post by: odaman68000 on August 29, 2024, 01:34:53 PM
Hi Thomas,

And it works!
Thank you very much.

Best regards,
Tetsuo Oda