English Amiga Board


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

 
 
Thread Tools
Old 22 August 2022, 15:57   #1
Firestone
Registered User
 
Firestone's Avatar
 
Join Date: Apr 2013
Location: Norway
Posts: 249
Get ENV-variables from Arexx?

Does ARexx have any builtin functions for accessing ENV-variables? I can't find anything in the docs about it.

Is the best way to open the file in the script, and then use ReadLN to get the value?
Firestone is offline  
Old 22 August 2022, 16:04   #2
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,606
Korodny uses the readln() method here: https://eab.abime.net/showpost.php?p...9&postcount=13

No idea if there's an easier way.
TCD is offline  
Old 22 August 2022, 16:09   #3
Firestone
Registered User
 
Firestone's Avatar
 
Join Date: Apr 2013
Location: Norway
Posts: 249
Yep I know, and it works just fine.
Bit surprised there wasn't any easier way as they are easily available in AmigaDOS scripting
Firestone is offline  
Old 22 August 2022, 18:19   #4
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Maybe address command getenv ?
meynaf is offline  
Old 22 August 2022, 19:50   #5
Firestone
Registered User
 
Firestone's Avatar
 
Join Date: Apr 2013
Location: Norway
Posts: 249
Quote:
Originally Posted by meynaf View Post
Maybe address command getenv ?
That will only display the value of the variable to the CLI. You don't get to store the value in an Arexx-variable.
Firestone is offline  
Old 22 August 2022, 20:44   #6
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
Then why not something like :
Code:
address command 'rx "push `getenv envvar`"'
pull rxvar
meynaf is offline  
Old 22 August 2022, 21:00   #7
Firestone
Registered User
 
Firestone's Avatar
 
Join Date: Apr 2013
Location: Norway
Posts: 249
Yay! That worked perfectly!

Thanks a lot!
Firestone 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
ENV-handler in kickstart Joel_w support.Apps 0 02 August 2019 15:02
Variables? Retro1234 Coders. Blitz Basic 12 15 March 2017 12:41
Insert ENV Message - OS3.9 LuMan support.Apps 6 28 April 2013 00:24
cannot save files to env: amifreak support.Hardware 2 20 December 2004 02:01

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 00:53.

Top

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