![]() |
![]() |
#1 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
ARexx Including One Script Into Another
Hi all!
Another ARexx question ![]() Is it possible to include one ARexx script into another? Something like include in C? (I scoured the Internet but couldn't find an answer...) Thanks! |
![]() |
![]() |
#2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,024
|
You can use CALL to run another script. Or, if the other script shall return a value, you can just call it as a function. But you cannot share global variables. Every data has to be transferred as parameters and return values.
|
![]() |
![]() |
#3 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,307
|
And if you need, you can use message ports for interaction among different scripts.
|
![]() |
![]() |
#4 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Hi Thomas and Daxb!
Thanks for your answers! ![]() I actually wanted to avoid either solution because I would need to pass data to the other script, which would require to PUSH/QUEUE data, which would be as long as the small piece of code that I want to "share" across many scripts ![]() That's okay, I'll duplicate some (little) code across scripts, not such big a deal even if it's not DRY... Thanks! |
![]() |
![]() |
#5 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,307
|
There is also SETCLIP(), RXSET and GETCLIP() to share global variables (simpler then message ports). I use this for three scripts to share small data. Read the explanation of this functions/command in ARexxGuide2. There is also an example "Global variables on the clip list".
|
![]() |
![]() |
#6 |
Returning fan!
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
|
Thanks Daxb!
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Request DOpus4 ARexx script to copy comments | EctoOne | Coders. Scripting | 0 | 02 November 2022 17:15 |
Icon position clearence by Script/ARexx ? | logical | support.Apps | 6 | 01 November 2018 16:38 |
Problem executing DOpus5 Arexx Script ... | beltrixx | support.Apps | 1 | 01 August 2015 22:16 |
Simple NewShell script?.. in Arexx? | Yoji | Coders. General | 5 | 19 May 2015 14:49 |
Arexx script (txt => hex) | Uukrul | Coders. General | 10 | 09 September 2001 04:02 |
|
|