English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System > Coders. Scripting

 
 
Thread Tools
Old 11 January 2019, 13:18   #1
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
AREXX - minimal requirements/setup?

Hi,

I've been struggling with AmigaDOS scripts and want to explore better scripting options to use within the startup-sequence script.

What is the minimal requirement/setup to get AREXX scripting to work? What commands and libraries do I need?

Cheers!
solarmon is offline  
Old 11 January 2019, 13:20   #2
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
Sorry, ignore this - just found a response to this question in my other thread!:

Requirements: More or less RexxMast running. See also https://wiki.amigaos.net/wiki/AmigaO...etting_Started In Libs should be rexxsyslib.library and rexxsupport.library. On an OS3 install they already exists.That's all. Of course you can use more libraries but not needed.

Last edited by solarmon; 11 January 2019 at 15:06.
solarmon is offline  
Old 12 January 2019, 14:10   #3
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
OK - so got ARexx installed and trying to use the datatypes.library from http://aminet.net/package/util/libs/dtypeslib453.

Even though I copied datatypes.libary to LIBS: and version is showing that it is version 45.3, the example examinedt.rexx script is throwing a:

"10/14: Requested Library not found"

And SnoopDos (I love this tool!) shows that the library fails to open - see attached image.

One observation, which may or may not be related, is that SnoopDos does not show/display the 'Fail' result text until I select the line - strange?

Can anybody explain why the library cannot be opened?

Cheers!
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	265
Size:	29.3 KB
ID:	61556  
solarmon is offline  
Old 12 January 2019, 14:13   #4
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
Looking at the example code, it looks like it is failing when trying to call the ExamineDT() function, even though the library was loaded OK with ADDLIB() prior to that.
solarmon is offline  
Old 12 January 2019, 15:04   #5
Zoltar3.1
Registered User
 
Zoltar3.1's Avatar
 
Join Date: Feb 2017
Location: Caladan
Posts: 33
Arexx was my all time unknown component... I never got to understand it :-o
Zoltar3.1 is offline  
Old 12 January 2019, 16:35   #6
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Quote:
Originally Posted by solarmon View Post
OK - so got ARexx installed and trying to use the datatypes.library from http://aminet.net/package/util/libs/dtypeslib453.

Even though I copied datatypes.libary to LIBS: and version is showing that it is version 45.3, the example examinedt.rexx script is throwing a:

"10/14: Requested Library not found"
In the Tooltypes of "examinedt.rexx script" it is set as "MultiView" command

Multiview to read the document "examinedt.rexx script" needs "text.datatype" installed in the system

If you need to run an arexx script instead, you must use the RX command instead not Multiview

Last edited by AMIGASYSTEM; 13 January 2019 at 19:07.
AMIGASYSTEM is offline  
Old 12 January 2019, 16:40   #7
Ami
Registered User
 
Ami's Avatar
 
Join Date: Sep 2014
Location: Poland
Posts: 175
Why you using 3rd party datatypes.library instead of original from OS3?

I'v tested this library and everything went OK.

ADDLIB() function is case-sensitive, library name must be all lower case.

Also, try "rxlib" to see if datatypes.library is properly loaded. If not, try to load it manually: rxlib datatypes.library 0 -30 0
Attached Thumbnails
Click image for larger version

Name:	sgrab000.png
Views:	134
Size:	1.0 KB
ID:	61559  

Last edited by Ami; 12 January 2019 at 17:13.
Ami is offline  
Old 12 January 2019, 17:02   #8
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Quote:
Originally Posted by Ami View Post
Why you using 3rd party datatypes.library instead of original from OS3?

I'v tested this library and everything went OK.

ADDLIB() function is case-sensitive, library name must be all lower case.
In fact datatypes.library 453 has problems in showing txt files, for other files example as images it is very fast and works well.
AMIGASYSTEM is offline  
Old 12 January 2019, 17:15   #9
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
Quote:
Originally Posted by AMIGASYSTEM View Post
In the Tooltypes of "examinedt.rexx script" it is set as "MultiView" command

Multiview to read the document "examinedt.rexx script" needs "text.datatype" installed in the system

If you need to run an arexx script instead, you must use the RX command instead not Multiview
You can see from my example screenshot that I am actually using 'rx'.

What you are referring to is the default application for that file, set in the examinedt.rexx.info file.
solarmon is offline  
Old 12 January 2019, 17:28   #10
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Quote:
Originally Posted by solarmon View Post
You can see from my example screenshot that I am actually using 'rx'.

What you are referring to is the default application for that file, set in the examinedt.rexx.info file.
RX it should not require "datatype.library" but "Rexxsyslib.library"

Last edited by AMIGASYSTEM; 13 January 2019 at 19:07.
AMIGASYSTEM is offline  
Old 12 January 2019, 17:30   #11
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
Quote:
Originally Posted by Ami View Post
Why you using 3rd party datatypes.library instead of original from OS3?

I'v tested this library and everything went OK.

ADDLIB() function is case-sensitive, library name must be all lower case.

Also, try "rxlib" to see if datatypes.library is properly loaded. If not, try to load it manually: rxlib datatypes.library 0 -30 0
The question of why I'm using it is not relevant to the issue I'm having. I did test it in ClassicWB LITE and it is working OK.

I used the example script provided by the dtypeslib453 package on aminet

However, the issue I'm having is during a minimal startup script. There must be some other dependencies/requirements I'm not aware of - that is why I used SnoopDos to try to figure that out.

Thanks for the tip about testing with rxlib. I've tried that and it does show the datatypes.library as being loaded.

I think the issue is when the ExamineDT() function is reached in the example script.

Cheers!
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	202
Size:	11.0 KB
ID:	61563  

Last edited by solarmon; 12 January 2019 at 17:38.
solarmon is offline  
Old 12 January 2019, 17:37   #12
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Quote:
Originally Posted by solarmon View Post
Thanks for the tip about testing with rxlib. I've tried that and it does show the datatypes.library as being loaded.
!
Repeat it is very strange that you are asked datatypes.library, here are the libraries that require RX

Last edited by AMIGASYSTEM; 13 January 2019 at 19:07.
AMIGASYSTEM is offline  
Old 12 January 2019, 17:42   #13
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
Quote:
Originally Posted by AMIGASYSTEM View Post
Repeat it is very strange that you are asked datatypes.library, here are the libraries that require RX, see screenshot !
Sorry - I think we are misunderstanding each other.

The issue I'm having is NOT getting rx working.

Also, I'm not saying that datatypes.library is required for rx to work.

I'm just trying to get the example examinedt.rexx script running to test using the datatypes.library.

Maybe I should have created a separate thread for this issue.

Apologies for the confusion.
solarmon is offline  
Old 12 January 2019, 17:52   #14
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Ok, unfortunately, the translation does not help much
AMIGASYSTEM is offline  
Old 12 January 2019, 18:04   #15
Ami
Registered User
 
Ami's Avatar
 
Join Date: Sep 2014
Location: Poland
Posts: 175
Maybe this is bug in 3.1 (also tested with 3.5, same behavior)? In 3.1.4 everything is OK.

Do you got this error even if you boot into full Workbench?

Last edited by Ami; 12 January 2019 at 18:19.
Ami is offline  
Old 12 January 2019, 18:40   #16
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
Quote:
Originally Posted by Ami View Post
Maybe this is bug in 3.1 (also tested with 3.5, same behavior)? In 3.1.4 everything is OK.

Do you got this error even if you boot into full Workbench?
I'm trying this on a minimal startup, based on the image I'm using for my WHDLoad Game Launcher - so it may not have everything it needs. I was hoping SnoopDos would tell what the dependencies are.

If this helps, the 'version' output of the setup I'm testing on is:

Code:
Kickstart 40.63, Workbench 40.42
I've actually now realised that the datatypes.library is not what I'm actually looking for at this moment. I thought it was, but it is not.

But I'd still like to know why I have this issue and how to resolve it. It will be good for my learning and understanding.

Cheers!
solarmon is offline  
Old 12 January 2019, 18:50   #17
Ami
Registered User
 
Ami's Avatar
 
Join Date: Sep 2014
Location: Poland
Posts: 175
OK got it! You must include this:

Code:
C:AddDatatypes REFRESH QUIET ; ENV: assign required!
Ami is offline  
Old 12 January 2019, 19:16   #18
solarmon
Registered User
 
solarmon's Avatar
 
Join Date: Dec 2018
Location: UK
Posts: 1,716
Quote:
Originally Posted by Ami View Post
OK got it! You must include this:

Code:
C:AddDatatypes REFRESH QUIET ; ENV: assign required!
I tried that. SnoopDos showed that it (AddDatatypes) was also looking for iffparse.library and locale.library - so I added those too.

However, I still have the same issue when running the examinedt.rexx script.

What does AddDatatypes actually do?
solarmon is offline  
Old 12 January 2019, 20:21   #19
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,304
In datatypes.library.doc you can read this:
Code:
RESULTS
        If STORAGE was set to "VAR", the result is the datatype name.
        On error, the numeric DOS error code is returned.
[...]
    NOTE

        - Error handling has been changed in V45. On error, the function
          now returns the error number (1 - 2099), which can be converted
          using rexx/GETDTSTRING; only serious errors (like "non memory")
          will end in a rexx error code.
So the returned number 14 is a DOS error code, not a ARexx error code. But I don't know what 14 is. At least there is something with this line: type = ExamineDT( fname,,VAR ). Try if other files (8svx. ilbm, ...) trigger the same error. If datatypes.library is buggy and you really need to determine file types you can use rexxtricks.library. It has functions that should do the same using whatis.library or FileID.library.
daxb is offline  
Old 12 January 2019, 21:22   #20
Ami
Registered User
 
Ami's Avatar
 
Join Date: Sep 2014
Location: Poland
Posts: 175
Quote:
Originally Posted by solarmon View Post
However, I still have the same issue when running the examinedt.rexx script.
I'm out of ideas.

Quote:
What does AddDatatypes actually do?
http://www.jaruzel.com/amiga/amiga-o...datatypes.html
Ami is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimal startup-sequence for Tinylauncher? emuola Amiga scene 13 03 January 2018 14:21
C - minimal setup code for drawing graphics attle Coders. C/C++ 3 06 February 2017 22:07
Minimal config for multiview jotd support.Apps 17 14 March 2016 22:38
68000 minimal list of opcodes to know kamelito Coders. Asm / Hardware 8 28 January 2014 21:43
A minimal request jobro Amiga scene 3 29 December 2005 03:24

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:01.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14123 seconds with 14 queries