English Amiga Board


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

 
 
Thread Tools
Old 11 January 2019, 14:18   #1
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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, 14:20   #2
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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 16:06.
solarmon is offline  
Old 12 January 2019, 15:10   #3
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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:	38
Size:	29.3 KB
ID:	61556  
solarmon is offline  
Old 12 January 2019, 15:13   #4
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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, 16:04   #5
Zoltar3.1
Registered User

Zoltar3.1's Avatar
 
Join Date: Feb 2017
Location: Caladan
Posts: 19
Arexx was my all time unknown component... I never got to understand it :-o
Zoltar3.1 is offline  
Old 12 January 2019, 17:35   #6
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 4,055
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 20:07.
AMIGASYSTEM is online now  
Old 12 January 2019, 17:40   #7
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 40
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:	9
Size:	1.0 KB
ID:	61559  

Last edited by Ami; 12 January 2019 at 18:13.
Ami is offline  
Old 12 January 2019, 18:02   #8
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 4,055
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 online now  
Old 12 January 2019, 18:15   #9
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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, 18:28   #10
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 4,055
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 20:07.
AMIGASYSTEM is online now  
Old 12 January 2019, 18:30   #11
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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:	18
Size:	11.0 KB
ID:	61563  

Last edited by solarmon; 12 January 2019 at 18:38.
solarmon is offline  
Old 12 January 2019, 18:37   #12
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 4,055
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 20:07.
AMIGASYSTEM is online now  
Old 12 January 2019, 18:42   #13
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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, 18:52   #14
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 4,055
Ok, unfortunately, the translation does not help much
AMIGASYSTEM is online now  
Old 12 January 2019, 19:04   #15
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 40
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 19:19.
Ami is offline  
Old 12 January 2019, 19:40   #16
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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, 19:50   #17
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 40
OK got it! You must include this:

Code:
C:AddDatatypes REFRESH QUIET ; ENV: assign required!
Ami is offline  
Old 12 January 2019, 20:16   #18
solarmon
Registered User

 
Join Date: Dec 2018
Location: UK
Posts: 65
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, 21:21   #19
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 2,165
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, 22:22   #20
Ami
Registered User

 
Join Date: Sep 2014
Location: Poland
Posts: 40
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 15:21
C - minimal setup code for drawing graphics attle Coders. C/C++ 3 06 February 2017 23:07
Minimal config for multiview jotd support.Apps 17 14 March 2016 23:38
68000 minimal list of opcodes to know kamelito Coders. Asm / Hardware 8 28 January 2014 22:43
A minimal request jobro Amiga scene 3 29 December 2005 04: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 20:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09098 seconds with 16 queries