Welcome, Guest. Please login or register.

Author Topic: Space charactor in ARexx script  (Read 4236 times)

Description:

0 Members and 2 Guests are viewing this topic.

Offline odaman68000Topic starter

  • Newbie
  • *
  • Join Date: Jun 2024
  • Posts: 2
  • Country: jp
  • Gender: Male
  • Amiga user since 1992
    • Show only replies by odaman68000
Space charactor in ARexx script
« 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???
A1200 with Blizzard 1230IV, 68030/50MHz, 32MB of RAM
 

Offline Thomas

Re: Space charactor in ARexx script
« Reply #1 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"




 
The following users thanked this post: odaman68000

Offline odaman68000Topic starter

  • Newbie
  • *
  • Join Date: Jun 2024
  • Posts: 2
  • Country: jp
  • Gender: Male
  • Amiga user since 1992
    • Show only replies by odaman68000
Re: Space charactor in ARexx script
« Reply #2 on: August 29, 2024, 01:34:53 PM »
Hi Thomas,

And it works!
Thank you very much.

Best regards,
Tetsuo Oda
A1200 with Blizzard 1230IV, 68030/50MHz, 32MB of RAM