Welcome, Guest. Please login or register.

Author Topic: Getting Started With AREXX  (Read 1654 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline XDelusionTopic starter

  • Alien Breeder
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 5089
    • Show only replies by XDelusion
    • http://starwarslegacy.net/
Getting Started With AREXX
« on: September 27, 2010, 09:02:12 PM »
Despite all my years using Amiga, I never took the time to understand AREXX.

How does one go about writing a script? Is it anything like writing BATCH files for DOS?

For example, I'd like to make a script to launch Giana's Return for MorphOS.

I'd like to start the game with -fs and -x2, but how would I write a script for this?
-----------------

Giana's Return Command line options:


-w : window mode (not fullscreen)

-fs : fullscreen (-x2 automatically added)

-x2 : zoom with no antialiasing-b16 : 16 bits video mode

-b24 : 24 bits video mode (maybe usefull if fade in/fade out looks crappy)

-aa : zoom with antialiasing

-noaa : no antialiasing



-a11 : audio playback at 11Khz

-a22 : audio playback at 22Khz

-a44 : audio playback at 44Khz
Earth has a lot of things other folks might want... like the whole planet. And maybe these folks would like a few changes made, like more carbon dioxide in the atmosphere and room for their way of life. - William S. Burroughs
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Getting Started With AREXX
« Reply #1 on: September 27, 2010, 09:13:12 PM »
ARexx is a scripting language and although you can use it to launch applications, you're better off using a regular AmigaDOS script for that, if it's required.

ARexx is far more powerful than AmigaDOS, but isn't really intended as a replacement. ARexx's principal strength is that it allows you to write scripts that can talk to "hosts"; that is, any application that has an ARexx port. This allows ARexx to control the application (within the limits of what features it exposes to ARexx). As a single script can communicate with multiple hosts, it can coordinate activity between applications. Any command it doesn't understand, it forwards to the currently selected host. By default, the host is the shell itself.

If you want to start with ARexx, the manuals are included on the OS3.5 / 3.9 CD. One of the features of Workbench in those versions are that it too has an ARexx port. I have several scripts that are launched at startup that I use to make my WB more accessible from the keyboard.

It's actually possible to write applications in ARexx but it isn't particularly quick (though considerably faster than AmigaDOS itself).
int p; // A
 

Offline XDelusionTopic starter

  • Alien Breeder
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 5089
    • Show only replies by XDelusion
    • http://starwarslegacy.net/
Re: Getting Started With AREXX
« Reply #2 on: September 27, 2010, 09:27:31 PM »
Then it sounds like I need a quick example for this in Amiga DOS then to get me started.

Thankx for the info.
Earth has a lot of things other folks might want... like the whole planet. And maybe these folks would like a few changes made, like more carbon dioxide in the atmosphere and room for their way of life. - William S. Burroughs
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Getting Started With AREXX
« Reply #3 on: September 27, 2010, 09:32:28 PM »
To do it in amigados, just create a text file and put into it exactly what you'd normally type in the shell to start it up with your desired settings.

Next, create an icon (.info file) for the file (copy a project icon for this purpose). Set the default tool of the icon to be "C:IconX" and save the changes*.

Job done. You can now double-click on the icon to launch the game as if you'd done it from the shell.


*Alternatively, in OS3.5+, you can just choose "Start from shell" in the icon properties.
int p; // A
 

Offline XDelusionTopic starter

  • Alien Breeder
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 5089
    • Show only replies by XDelusion
    • http://starwarslegacy.net/
Re: Getting Started With AREXX
« Reply #4 on: September 27, 2010, 09:34:41 PM »
That easy hugh?

Great, going home to try this out, thankx again!
Earth has a lot of things other folks might want... like the whole planet. And maybe these folks would like a few changes made, like more carbon dioxide in the atmosphere and room for their way of life. - William S. Burroughs
 

Offline kolla

Re: Getting Started With AREXX
« Reply #5 on: September 27, 2010, 10:21:27 PM »
Quote from: Karlos;581597
*Alternatively, in OS3.5+, you can just choose "Start from shell" in the icon properties.


Which IIRC is just a fancy way of putting "CLI" and "DONOTPROMPT" in as tooltype on OS3.0/OS3.1.
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Getting Started With AREXX
« Reply #6 on: September 27, 2010, 10:24:24 PM »
Quote from: kolla;581621
Which IIRC is just a fancy way of putting "CLI" and "DONOTPROMPT" in as tooltype on OS3.0/OS3.1.


Dunno, always used IconX to run scripts from workbench. Were these tooltypes available in 2.x?
int p; // A
 

Offline kolla

Re: Getting Started With AREXX
« Reply #7 on: September 27, 2010, 10:37:39 PM »
Quote from: Karlos;581623
Dunno, always used IconX to run scripts from workbench. Were these tooltypes available in 2.x?

No idea, I started with 3.0 and moved onto 3.1, 3.5 and finally 3.9, never really used OS2.x :)
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Getting Started With AREXX
« Reply #8 on: September 27, 2010, 10:40:22 PM »
Quote from: kolla;581631
No idea, I started with 3.0 and moved onto 3.1, 3.5 and finally 3.9, never really used OS2.x :)


Ah you missed out, in a way. My first was 2.04, which made 3.0 seem a reasonable update. I never owned a 1.2/1.3 machine though, I imagine the change between that and 2.x was even more pronounced.
int p; // A
 

Offline Franko

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 5707
    • Show only replies by Franko
Re: Getting Started With AREXX
« Reply #9 on: September 27, 2010, 11:09:27 PM »
Quote from: Karlos;581632
Ah you missed out, in a way. My first was 2.04, which made 3.0 seem a reasonable update. I never owned a 1.2/1.3 machine though, I imagine the change between that and 2.x was even more pronounced.


My first A500 was one of the very first one's ever released here in the UK. It didn't even have the ability to switch off/on the low pass audio filter. Going from 1.2/1.3 to 2.04 was like you had a whole new system to explore.

I still have the old HD with 2.04 on it from my old A1500 (anyone remember that machine, I think it was only released here in the UK)

Then of course came 3.0/3.1 which finally made the Amiga the best home computer ever, in my humble opinion...
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16867
  • Country: gb
  • Thanked: 4 times
    • Show only replies by Karlos
Re: Getting Started With AREXX
« Reply #10 on: September 28, 2010, 01:01:55 AM »
Quote
It didn't even have the ability to switch off/on the low pass audio filter
The biggest problem with the audio filter on the Amiga is that it's a single frequency across all channels and set too low (IMO).

Imagine the fun if each of the 4 channels had it's own analogue LPF with digitally selectable cutoff frequency and resonance? That would have been so awesome; Protracker with resonant filters...

Anyhow, what were we talking about, again?

ARexx or summat?
int p; // A
 

Offline Franko

  • Hero Member
  • *****
  • Join Date: Jun 2010
  • Posts: 5707
    • Show only replies by Franko
Re: Getting Started With AREXX
« Reply #11 on: September 28, 2010, 02:00:57 AM »
Quote from: Karlos;581660
Anyhow, what were we talking about, again?

ARexx or summat?


Dunno I've forgot, been a wide range of subjects tonight, Quantum Computing, Brownian Motion Liquid & Vindaloo, to name but a few. Reckon everyone's been on the old Irn Bru tonight... :)

Anyway back to the subject, AREXX, what is it and can you make a good curry from it... :biglaugh:
 

Offline XDelusionTopic starter

  • Alien Breeder
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 5089
    • Show only replies by XDelusion
    • http://starwarslegacy.net/
Re: Getting Started With AREXX
« Reply #12 on: February 08, 2011, 04:32:45 AM »
Quote from: Karlos;581660
The biggest problem with the audio filter on the Amiga is that it's a single frequency across all channels and set too low (IMO).

Imagine the fun if each of the 4 channels had it's own analogue LPF with digitally selectable cutoff frequency and resonance? That would have been so awesome; Protracker with resonant filters...

Anyhow, what were we talking about, again?

ARexx or summat?



This is a LATE response, but NO DOUBT!!! I'm with you there. I wonder if some sort of hardware hack could be done?
Earth has a lot of things other folks might want... like the whole planet. And maybe these folks would like a few changes made, like more carbon dioxide in the atmosphere and room for their way of life. - William S. Burroughs
 

Offline pVC

Re: Getting Started With AREXX
« Reply #13 on: February 08, 2011, 05:57:19 AM »
Quote from: Karlos;581597
To do it in amigados, just create a text file and put into it exactly what you'd normally type in the shell to start it up with your desired settings.

Next, create an icon (.info file) for the file (copy a project icon for this purpose). Set the default tool of the icon to be "C:IconX" and save the changes*.

Job done. You can now double-click on the icon to launch the game as if you'd done it from the shell.


And if you want to run the script from shell, either use execute command (execute script) or add S protection bit for it (protect script +s) and then you can run the script by just typing its name (just like any commmand).
Daily MorphOS user and Amiga active.