Headlines
amiarcadia.lha - emulation/gamesystem
Aug 18, 2025
amigagpt.lha - network/chat
Aug 17, 2025
polarpaint.lha - graphics/edit
Aug 16, 2025
polarpaint_small.lha - graphics/edit
Aug 16, 2025
janggi.lha - game/board
Aug 13, 2025
mce.lha - game/utility
Aug 13, 2025
amissl-sdk.lha - development/misc
Aug 12, 2025
amissl.lha - library/misc
Aug 12, 2025
cardsmakingkit.lha - game/utility
Aug 11, 2025
qt6demos.lha - development/cross
Aug 10, 2025
Topic options
View mode
Newest First
Scripting help plox
Posted on:
2011/6/18 14:36
#1
Quite a regular
Joined: 2010/5/16 11:20Last Login
: 2018/10/16 7:05
From Grimsby, UK
Group:
Registered Users
Hi, 2 questions, firstly AMIGADOS: Self-explanatory, how do I get this to work? version c:smbfs >ENV:smbfsver if $smbfsver >=1.66 echo "here" else echo "lower than 1.66" endif Secondly, Arexx: options results id='req'pragma('id') address command 'rxset' id $jack_destination path=getclip(id) call setclip(id,'') address workbench window windows path open --- This works fine, but how do I join strings? I want to be able to do this: Lets asume $jack_destination = RAM Disk: address command 'rxset' id $jack_destination + Jack/ I would also love to not only open the destination drawer, but launch the actual application, but with limitated documentation it is hard to work with environment variables in both AmigaDOS and Arexx.
Re: Scripting help plox
Posted on:
2011/6/18 15:39
#2
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 1/28 0:19
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
@djrikki
Quote:
With AmigaDOS scripts it's:
IF 1.66 GE $smbfsver
It looks there's not lesser than option. (I remembered it should exist. At least in older AmigaOS versions ?)
Put IF ? into a script to get all arguments listed.
GT = greater than
GE = greater or equal
Quote: "NOTE: You can use NOT GE for LT and NOT GT for LE."
EQ = equal
...
(Edit: I found the documentation...)
sys:Documentation/C/
sys:Documentation/C/shell.doc
@AmigaOS devs
It's required to put IF into a script but when typing IF ? into a Shell it should display all arguments IMHO, shouldn't it ?!?
Edited by TSK on 2011/6/18 16:02:53 Edited by TSK on 2011/6/18 16:03:58
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Re: Scripting help plox
Posted on:
2011/6/18 15:42
#3
Quite a regular
Joined: 2010/5/16 11:20Last Login
: 2018/10/16 7:05
From Grimsby, UK
Group:
Registered Users
I already tried that... IF: wrong number of arguments... $smbfsver contains text as well: smbfs 1.66 NAME,VERSION/N,REVISION/N,FILE/S,FULL/S,UNIT/N,INTERNAL/S,RES/S,VSTRING/S: Playing around I cannot seem to get the number only.
Re: Scripting help plox
Posted on:
2011/6/18 15:56
#4
Just can't stay away
Joined: 2007/2/23 13:49Last Login
: 1/28 0:19
From Finland, the land of Santa, sauna, sisu and salmiakki
Group:
Registered Users
@djrikki Try this: Version C:smbfs version=1 revision=66 >nil: IF WARN Echo "Version too old" ELSE Echo "Version ok" ENDIF
Rock lobster bit me - so I'm here forever X1000 + AmigaOS 4.1 FE "Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Re: Scripting help plox
Posted on:
2011/6/18 16:00
#5
Quite a regular
Joined: 2010/5/16 11:20Last Login
: 2018/10/16 7:05
From Grimsby, UK
Group:
Registered Users
Thanks TSK. Yeah I just looked on Aminet and came across Frank Burton's AmigaDOS for Beginners... what you wrote is exactly what I should do. I would have never have guessed that!
Re: Scripting help plox
Posted on:
2011/6/18 16:06
#6
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Today 8:10
From England
Group:
Registered Users Moderators
2. ARexx I don't have a clue what that code is doing, however have a play around with the PathPart AmigaDOS command - it joins and splits paths. Otherwise you can put something together in ARexx which checks if the last character of the initial string ends in : or /, add / if it doesn't and then append whatever the next part of the path is. That should work in the majority of cases.
Re: Scripting help plox
Posted on:
2011/6/18 16:47
#7
Quite a regular
Joined: 2009/3/10 10:51Last Login
: 2024/9/19 8:56
From Germany
Group:
Registered Users
@djrikki
You can simpy join strings in ARexx with '||', something like this:
text = text || "Eine oder mehrere Umgebungsvariablen" || nl ||, "sind nicht zu finden/zu öffnen !"
Further ARexx has some powerful DOS extensions, that should be able to retrieve pathes, filenames etc. for you.
BTW: Why not use a newer version of SMBFS? (Version 1.74:
http://amiga-smbfs.sourceforge.net/ )
X1000|II/G4|440ep|2000/060|2000/040|1000
Re: Scripting help plox
Posted on:
2011/6/18 18:49
#8
Just can't stay away
Joined: 2006/12/9 10:44Last Login
: 7/31 21:47
From Lyon, France
Group:
Registered Users
@djrikki
Quote:
but with limitated documentation it is hard to work with environment variables in both AmigaDOS and Arexx. Arexx documentation
http://aminet.net/package/util/rexx/ARexxGuide2_0A @TSK
Quote:
It looks there's not lesser than option. (I remembered it should exist. At least in older AmigaOS versions ?) Quote:
It's required to put IF into a script but when typing IF ? into a Shell it should display all arguments IMHO, shouldn't it ?!? I reported both already.
Edited by Elwood on 2011/6/18 22:07:48
Re: Scripting help plox
Posted on:
2011/6/20 14:55
#9
Just can't stay away
Joined: 2008/1/6 17:56Last Login
: 2023/4/18 19:37
From Pennsylvania, USA
Group:
Registered Users
@djrkki Try this: set jackpath `PATHPART ADD "$jack_destination" "jack"` echo $jackpath Keep in mind that the hashmarks " `" are not the same as apostrophe " ' "
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
Currently Active Users Viewing This Thread:
1
(
0 members
and 1 Anonymous Users
)